I'm trying to use the instagram graph api to get media comments. I followed the developers.facebook.com instruction, and the basic steps worked just fine!!
When I run: https://graph.instagram.com/:media-id?fields=id,caption,timestamp&access_token={{TOKEN}}
{
"id": "17886788.....1695",
"caption": "My test Post caption",
"timestamp": "2023-10-13T14:54:00+0000"
}
From the documentation, at developers.facebook.com. If I set comments_count at fields parameter or add /comments at request, I'll get the comments for the media. But it's not working.
When I run: https://graph.instagram.com/:id-media?fields=id,caption,comments_count&access_token={{TOKEN}}
{
"error": {
"message": "Tried accessing nonexisting field (comments_count) on node type (Media)",
"type": "IGApiException",
"code": 100,
"fbtrace_id": "ADdxjorTTYks2r-WacS91yn"
}
}
When I run: https://graph.instagram.com/:id-media/comments?access_token={{TOKEN}}
{
"error": {
"message": "Tried accessing nonexisting field (comments) on node type (Media)",
"type": "IGApiException",
"code": 100,
"fbtrace_id": "AtG_CT7PRqLe4aZ2AAQejs5"
}
}
For the token, I've already added this scopes:
- user_profile
- user_media
- instagram_basic
- instagram_graph_user_profile
- instagram_graph_user_media
- instagram_manage_comments
- pages_show_list
- pages_read_engagement
- ads_management
- business_management
Anyone knows what I need to do to make it works?!
Searching at developers.facebook.com community. I just found this post
https://developers.facebook.com/community/threads/2219648518091109/
It has the comment:
From your business Manager I just go to Business Info -> Business Contract (https://business.facebook.com/settings/info)
I'll reply if this real solve the problem, because the documentation, does not inform this needs