Upload comments to particular post of facebook with object_id android

后端 未结 2 1070
南笙
南笙 2021-01-16 22:50

Hello friends I want to post comment to particular post in facebook with my android app, below is my code-

I Fetch All comments from URL which is below

2条回答
  •  旧巷少年郎
    2021-01-16 23:26

    To post a comment on a post, you need a post_id instead of object_id.

    So your API call must be-

    /{post_id}/comments
    

    (post_id is also a field in the comments table)

    Edit:

    You must be using a comment plugin and trying to post a comment to that. Unfortunately, facebook don't allows you to do that! (Logical- since most of them are public, to avoid spamming, else anyone could flood comments to that post)

    If you check the response here, you'll get:

    {
      "error": {
         "message": "(#100) Comments may not be added to a comment plugin", 
         "type": "OAuthException", 
         "code": 100
      }
    }
    

    You can test these API call on Graph API Explorer also.

提交回复
热议问题