2010-07-12 9 views
4

Est-il possible de partager l'image d'un utilisateur avec ses amis en utilisant l'API?Partager l'image via facebook API

Somethin comme la méthode stream.pubslish comme elle est invoquée par FB.ui

Merci

Répondre

8

Peut-être quelque chose comme ceci:

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); 

Voici un exemple en direct: http://fbrell.com/fb.ui/stream.publish

Questions connexes