使用API​​发布到Facebook墙时出错:发生错误(#100)链接URL格式不正确

Cra*_*lot 0 facebook facebook-graph-api

这是代码:

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);
  }
});
Run Code Online (Sandbox Code Playgroud)

有线索吗?

jco*_*ctx 5

你为它添加了一个字符串'post URL' link.link必须是格式正确的URL http://stackoverflow.com/.