I am trying to post to the wall. It does not work when i add arguments like link, name and caption.
function graphStreamPublish(){
var body = 'This is a tes开发者_高级运维t feed';
var url = 'http://www.my-site.com';
var heading = 'Check out the link.';
var caption = 'I am trying to get it work.';
FB.api('/me/feed', 'post', { message: body, link: link, name: heading, caption: caption}, function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post ID: ' + response.id);
}
});
}
I understand the link, name and caption are cceptable parameters. Am i missing something. It works fine with just message argument.
I appreciate all your help.
Thanks.
First of all your link variable name is url
and you are sending link
.
I think I know what's the problem. Facebook doesn't like posting a link without a description (undocumented feature?). I faced similar problem, when I added description to the message it went through.
精彩评论