2011-09-02 85 views
1

当用户在我们的某个网站发布评论时,我们给他们发送评论到他们的facebook墙上的选项。即下面的代码:FB.ui提要帖子对话框更改

FB.ui({ 
    method: "stream.publish", 
    attachment: { 
     "name": "article title", 
     "href": document.location.href, 
     "description": "an excerpt from the article" 
    } 
    message: userComment, // The comment that the user entered on our site 
    user_prompt_message: shareText // "What do you think?" or similar, configurable 
}, function(response){ 
    if(response && response.post_id){ 
     // success! 
    } 
    else{ 
     // failed! 
    } 
}); 

此弹出一个对话框,在“这里的评论”输入预填充相同意见张贴在我们网站上的用户。通过Facebook Platform Policies完全没问题,甚至在我们最初实施时已经正式受到鼓励。

但是evidently他们在7月12日弃用message参数。所以现在你会得到一个很大的“分享”框,你实际想要分享的内容(用户的评论)并不包含在任何地方。所以,我们正在寻找另一种发布用户评论的方式。

因此,在stream.publishlatest documentation还是说,我们可以通过API调用直接传递message参数,即

https://api.facebook.com/method/stream.publish?callback=derp&message=EABOD+Facebook&access_token=MY_ACCESS_TOKEN&format=json 

我测试了它和它的作品,但我想知道,如果它仍然会工作会转发,还是他们还没有关闭呢?

回答

1

如果它将被替换,我将是供给方法,这与streem方法非常相似。

FB.ui(
    { 
     method: 'feed', 
     link: 'http://myapp.com/myitem', 
     display: 'iframe', 
     picture: 'http://myapp.com/mylogo.jpg', 
     message: 'my message', 
     name: 'click to see item', 
     caption: 'title' 
    }) 

我们会看到下一个主要版本,看看!

+1

“消息”选项也被“feed”方法忽略。 –

+0

我不得不添加redirect_uri:....和next:null,因为它在我的iframe选项卡应用程序内工作... any1知道为什么吗?谢谢 – Enrique