I'm trying to access the Graph API to retrieve instagram media and comments from managed accounts -- the logged user is an administrator. This (summarized) workflow is applied:
GET /me/accounts?access_token=<user_access_token>
GET /<fb_page_id>?fields=instagram_business_account?access_token=<page_access_token>
GET /<ig_profile_id>/media?fields=[...]&access_token=<user_access_token>
Now, say that the user manages FB pages A,B,C which are connected to the instagram business accounts D,E,F, all of this is working for pages A,B,C flawlessly, it is also working for linked instagram accounts D (linked to page A) and E (linked to page B), but when the F account endpoint is called, it returns the following:
GET /<ig_profile_id>/media?fields=[...]&access_token=<user_access_token>
{
"error": {
"message": "(#100) Tried accessing nonexisting field (media) on node type (InstagramUser)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "..."
}
}
I've been through the business manager multiple times, but there is no apparent differences with the other (working) cases. Other calls to this endpoint such as
GET /<ig_profile_id>?fields=[id,media_count...]
return the correct data, which confirms the IG profile is the correct one and working. I assume this may be a configuration/permission issue, but I'm running short of places where to look. Any other suggestion is welcome.
There is an IG User
type, that has a media
edge. As it says on top of that page, this represents an Instagram Business Account or an Instagram Creator Account.
But then there is also an Instagram User
type - and that does not have a media
edge.
And according to your error message, you appear to be dealing with the latter. So that account is neither an Instagram Business Account or an Instagram Creator Account, I suppose.