0

需要使用 jquery 或 javascript 将事件信息发送到用户的 facebook 个人资料。用户登录我的网站并创建一个活动,但这些活动详细信息必须发送到他/她的个人资料,以便他可以向他/她的朋友发送邀请,他们可以回复活动,我的网站基于jquery 和 javascript,并在后端使用 java 作为中间件和 mysql 5.1。

当我用谷歌搜索http://www.triadwebcrafters.com/blog/?p=140

但它在冷聚变,

之前是否有人已经这样做过,或者是否有任何可用的库或教程。

请帮助我

4

1 回答 1

2

让您的用户通过 javascript facebook sdk 登录到 facebook。

接下来,发布到他的个人资料:

function publish_it()
{
 var publish = {
  method: 'stream.publish',
  message: 'your message',
  attachment: {
    name: 'invitation',
    description: 'a very pretty invitation!',
    href: 'href to the invitation',
    media: [
              { type: 'image', src: 'http://site.com/image.jpg', href: 'href to the invitation'}
              ]
  },
  action_links: [
    { text: 'come as well!', href: 'href to the invitation' }
  ]};

FB.ui(publish);    

  }
于 2011-04-23T15:20:36.517 回答