2010-08-29 82 views
2

我正在尝试发布到墙上。当我添加链接,名称和标题等参数时它不起作用。使用Graph Api发布到用户墙上的问题

function graphStreamPublish(){ 
       var body = 'This is a test 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); 
        } 
       }); 
      } 

我明白链接,名称和标题是cceptable参数。我错过了什么。它只适用于消息参数。

我感谢你的帮助。

谢谢。

回答

1

首先你的链接变量名是url,你发送的是link

我想我知道是什么问题。 Facebook不喜欢发布没有描述的链接(无文档功能?)。我遇到了类似的问题,当我将描述添加到它所经历的消息中时。

相关问题