Share image via facebook API

Is there a way that I can share the image with friends using the API.

Something like the stream.pubslish method, as it is called through FB.ui

thanks

+4
source share
1 answer

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\ 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

+8
source

Source: https://habr.com/ru/post/1315414/


All Articles