3

在网站上安装 Facebook 评论插件后,是否可以通过 Graph(或其他)API 以编程方式添加和删除评论?例如,如果发布者(使用他们的 FB 个人资料)想要播种评论。

4

3 回答 3

2

答案是否定的,这是不可能的,设计使然。

使用Graph Explorer ,您可以在此处测试 Comments 对象的详细 API 调用:

POST {object_id}/comments?message='graph-test-1'

...这(假设您有一个正确配置的评论插件)导致:

{
  "error": {
    "message": "(#100) Comments may not be added to a comment plugin", 
    "type": "OAuthException", 
    "code": 100
  }
}
于 2013-07-25T00:40:17.783 回答
0

In theory, all comments made through the plugin have id's which can be accessed via the graph api.

For example: https://graph.facebook.com/comments/?ids=http://developers.facebook.com/docs/reference/plugins/comments

&&

https://developers.facebook.com/docs/reference/api/Comment/

Posting like or comment to that id should generate a comment in that array. I have never done this, but i will give it shot and post back with any sample code i can get working. "via PHP SDK 3.1.1"

于 2012-04-03T20:27:20.233 回答
0

facebook的graph API不能用来给评论插件添加评论,只有网页版的评论社交插件可以做到。

于 2016-01-18T08:20:39.257 回答