开发者

Deleting facebook comments

I have cr开发者_开发知识库eated an app where users can post their comments on a page. Now I am able to access all the comments (and also its details such as object id of the comments, comments id's, post_fbid, xid) but when I am trying to delete any one's comment using graph api (using HTTP DELETE REQUEST (https://graph.facebook.com/comment_id?method=delete&access_token=xxx) then its throwing the error

{
  "error": {
    "type": "OAuthException",
    "message": "(#200) Users can only delete their own comments"
  }
}

Is it not possible to delete the comments as admin. If its possible then please post the solution.


You need to use an admin's access_token for the relevant page. To do this get a manage_page scope in your authentication (redirect the admin person with scope manage_page). After that you can use the new Facebook function to get a page access token http://developers.facebook.com/blog/post/524/ (every page has different admin access_token) I think this access_token will grant the most usefull permission, so it should be allow to delete post as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜