开发者

Error when posting to Facebook wall with API: Error occured (#100) link URL is not properly formatted

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. link has to be a properly formatted URL like http://stackoverflow.com/.


Had same problem ... the issue was in the message (description) . i had an invalid URL. in my case i used a link to a non existing facebook page. it seems that facebook checks the validity of the page before linking it from the description. just check all your links before adding them in a posting description

i just fixed the url and every thing worked fine

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜