开发者

Share image through facebook API

开发者 https://www.devze.com 2023-01-07 07:33 出处:网络
Is there any way that I can share a user\'s image with his friends by using the API. S开发者_Go百科omethin like the stream.pubslish method as it is invoked through FB.ui

Is there any way that I can share a user's image with his friends by using the API.

S开发者_Go百科omethin like the stream.pubslish method as it is invoked through FB.ui

Thanks


Maybe something like this:

var publish = {
  method: 'stream.publish',
  message: 'getting educated about Facebook Connect',
  attachment: {
    name: 'Connect',
    caption: 'The Facebook Connect JavaScript SDK',
    description: (
      'A small JavaScript library that allows you to harness ' +
      'the power of Facebook, bringing the user\'s identity, ' +
      'social graph and distribution power to your site.'
    ),
    href: 'http://fbrell.com/',
    media: [
      {
        type: 'image',
        href: 'http://fbrell.com/',
        src: 'http://fbrell.com/f8.jpg'
      }
    ],
  },
  action_links: [
    { text: 'fbrell', href: 'http://fbrell.com/' }
  ],
  user_prompt_message: 'Share your thoughts about RELL'
};

FB.ui(publish);

Here's a live example: http://fbrell.com/fb.ui/stream.publish

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号