Permssion issue when publish comment with Facebook Graph API v2.12

I am testing the facebook graph API comments

  1. I checked my permission for the access token it contains the permission, which required by API. see the screenshot

enter image description here

  1. I test my object-id (1797963943566411_1975256375837166) which is correct see me screenshot

enter image description here

  1. Change the request method to POST and adding post data {"message": "haha"} I get the error message shows: "(#3) Publishing comments through the API is only available for page access tokens" see my screenshot

enter image description here

As you can see the first step checking, I have all the permission that the API required.

Can any one see any sort of error in this process?

1 answer

  • answered 2018-02-13 03:01 Yizhang Yin

    Try another way still not work.

    I have a user who post a photo on his own facebook page.

    1. I logged in with this user and give this user all permissions see the screenshot enter image description here

    2. call /me/accounts to get page access token enter image description here

    3. copy the page access token into the Graph API Explorer's access token field call GET: 1797963943566411_1975256375837166/likes is working fine

    But call POST: 1797963943566411_1975256375837166/likes

    Get error response:

    { "error": { "message": "(#200) Permissions error", "type": "OAuthException", "code": 200, "fbtrace_id": "GtEaBfyXrUD" } }

    The reason is Facebook changed the API behaviour. We are no longer to use api to like any POST on our time line. API can only like or comments on facebook page. Sad face !!!!