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
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):
Using From in the Fields works for me. Try playing around with permissions and it would work.