skip to Main Content

With the new Instagram Graph API (graph.instagram.com) it is not possible to get the username of comments.
The API is also known as "Instagram API with Instagram Login" (https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login)

When I specify the field "username" the API does not return a username: https://graph.instagram.com/<media_id>/comments?fields=text,username&access_token=<access_token>

Response:

...
{
"text": "The text of the comment",
"id": "1234567891234"
},
...

When I specify the field from it returns this error:

{
  "error": {
    "message": "Permissions error",
    "type": "IGApiException",
    "code": 200,
    "fbtrace_id": "B65VxFeFQTrxLPcgbSb6c3N"
  }
}

It works with the old Facebook Graph API but not with the new one (graph.instagram.com).

2

Answers


  1. Since you at least get the text, do you have any idea why I always get an empty array (there are comments and it is from one of the test users I gave access to):

    {
        "data": [],
        "paging": {
            "cursors": {
                "before": "QVFIUk11RnBiUzBSeHdHLXFCamtWaVVwN3Y3dFltT1U2ZA3RTdWc3WVQxS09QU19UVnVIOVlYbVRMZA1pQMWd2T2lXODF1YVdzNk5jQVRzX3RibGNnamhLdmJn",
                "after": "QVFIUjE2RjAzVUoxcjBVZAmdhaEFxeVZAmQTRHcEJDX1M4ZAXJIcmt1T3UybEJDQWwyOU9tT2lENnVkVkJVZAjgzbExVODVMd2tja1BDbElnb3JzaU9teXlaQktn"
            },
            "next":"..."
        }
    }
    
    Login or Signup to reply.
  2. Using From in the Fields works for me. Try playing around with permissions and it would work.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search