Search code examples
facebookfacebook-graph-apifacebook-javascript-sdkfacebook-comments

Graph API: get user who comment on page post


I'm trying to get all the comments of page post with name of who comment using this query:

{post_id}/comments?fields=from,message

but it doesn't return the from field

I'm using v16.0 of Facebook graph API.

my app was reviewed for this permissions pages_read_user_content, pages_read_engagement,pages_show_list, I'm using page access token and the app is in live mode but nothing

is there anything I'm missing ?

i will be thankful for any help

i tried to inspect other apps are using this functionality and i believe we are requesting the same permission from user


Solution

  • To get user info from comments you need:

    1. Have business verified
    2. have approved permissions with advanced access for pages_read_user_content, pages_read_engagement,pages_show_list
    3. have approved permissions with advanced access for Business Asset User Profile Access
    4. Correct Privacy and Terms of service published

    And a lot of patience... we send my app 12 times before approved the last permission.

    Reference: https://developers.facebook.com/docs/features-reference/business-asset-user-profile-access/