In Facebook how can I post a message onto a user's wall saying "I scored 8/10 on objects game" then a URL?
I really don't want to have to use the full API, as I don't want to handle user login details. I don't mind if Facebook needs to authenticate and then post the message.
Is it possible using the new Graph API and JavaScript?
API Version Deprecations: As part of Facebook's Graph API and Marketing API, please note the upcoming deprecations: August 3, 2021: Graph API v3. 3 will be deprecated and removed from the platform. August 25, 2021 Marketing API v9.
Note 4/16/2011: stream.publish seems to have been deprecated, There's a new way to do this: http://developers.facebook.com/docs/reference/dialogs/feed/
You can use something like this to publish to a wall, the user will need to confirm before it get sent. Don't forget that you'll need to use FB.init and include the JS SDK link.
function fb_publish() { FB.ui( { method: 'stream.publish', message: 'Message here.', attachment: { name: 'Name here', caption: 'Caption here.', description: ( 'description here' ), href: 'url here' }, action_links: [ { text: 'Code', href: 'action url here' } ], user_prompt_message: 'Personal message here' }, function(response) { if (response && response.post_id) { alert('Post was published.'); } else { alert('Post was not published.'); } } ); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With