Here is the code:
attachment = { message:'', name: 'post title', caption: 'user just did something',
link: 'post URL', action_links: [{ text: 'action link test', href: 'http://example.com'}]
};
FB.api('/me/feed', 'post', attachment, function(response) {
if (!response || response.error) {
alert('Error occured ' + response.error.message);
} else {
alert('Post ID: ' + response.id);
}
});
Any clues?
You put a string ‘post URL’ for the
link.linkhas to be a properly formatted URL likehttp://stackoverflow.com/.