当用户在我们的某个网站上发布评论时,我们会向他们提供将评论发送到他们的Facebook墙的选项。即以下代码:
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.publish
上的latest documentation仍然表示我们可以通过API调用直接传递message
参数,即
https://api.facebook.com/method/stream.publish?callback=derp&message=EABOD+Facebook&access_token=MY_ACCESS_TOKEN&format=json
我测试了它并且它有效,但我想知道它是否仍然可以继续工作,或者它们是否还没有关闭它?
答案 0 :(得分:1)
如果它被替换,我将成为feed方法,这与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'
})
我们将看到下一个主要版本并看到!