Comment API Issue After Update to v20.0: Missing 'from' Field for Non-Test Users
3

After updating to API version v20.0, the Comment API fails to retrieve the 'from' field (including PSID and name) for non-test users. When using a verified and live app to fetch comments on posts using the page's Access Token, the 'from' field is only populated for test users. Comments from non-test users return without the 'from' field. This issue did not exist prior to the v20.0 update.

Below is the API usage flow and the response from step 4. As shown, the 'from' field is only available for the test users, while it is missing for non-test users. This functionality worked correctly before v20.

1. Obtain a User Access Token via OAuth

Permissions (all approved by Facebook and the app mode is live):

public_profile
email
pages_read_engagement
pages_show_list
pages_read_user_content

2. Use the User Access Token to retrieve the Page Access Token

GET me/accounts

{
  "data": [
    {
      "id": "115...",
      "access_token": "<Page Access Token>",
      "name": "Page Name",
      "tasks": [
        "ADVERTISE",
        "ANALYZE",
        "CREATE_CONTENT",
        "MESSAGING",
        "MODERATE",
        "MANAGE"
      ]
    },
    ...
  ]
}

3. Use the to fetch posts

GET me/posts

{
  "data": [
    {
      "created_time": "2024-05-24T13:51:35+0000",
      "message": "Post Message",
      "id": "<Post Id>"
    },
    ...
  ]
}

4. Use the to fetch comments

GET <Post Id>/comments?fields=id,from,message

{
  "data": [
    {
      "id": "<Comment Id 1>",
      "message": "message"
    },
    {
      "id": "<Comment Id 2>",
      "message": "message"
      // Where is from?
    },
    {
      "from": {
        "name": "<Tester Name>",
        "id": "<Tester PSID>"
      },
      "id": "<Comment Id 3>",
      "message": "message"
    }
  ]
}

As shown, the 'from' field is missing for comments from non-test users, which was not the case before the v20 update. This issue needs to be addressed as it affects the ability to properly attribute comments to their respective users.

Our app's permissions have all been approved by Facebook to get "Advanced access" and the app mode is live. Everything was working correctly last week. After the release of version v20, this issue occurs across all API versions.

Danny Chyou
Asked about 3 weeks ago