I think I have answers to most of this question...
If I query a certain Facebook Page, it returns values for all four Instagram fields: page_backed_instagram_accounts, instagram_business_account, instagram_accounts, connected_instagram_account. The section below shows an edited version of what is returned and what happens when I try to access each using the Instagram API:
page_backed_instagram_accounts=#<Hashie::Mash data=#<Hashie::Array [#<Hashie::Mash id="964...289">]>
ERROR: "OAuthException: (#100) Tried accessing nonexisting field (biography) on node type (InstagramUser)"
instagram_business_account=#<Hashie::Mash id="178...143">
#<Hashie::Mash followers_count=X follows_count=Y ... username="<public handle>" website="https://www.../">
instagram_accounts=#<Hashie::Mash data=#<Hashie::Array [#<Hashie::Mash id="423...525">]>>
ERROR: "OAuthException: (#100) Tried accessing nonexisting field (biography) on node type (InstagramUser)"
connected_instagram_account=#<Hashie::Mash id="178...143">
#<Hashie::Mash followers_count=X follows_count=Y ... username="<public handle>" website="https://www.../">
As you can see, the Instagram API can access instagram_business_account and connected_instagram_account (which are the same account in this case) but not page_backed_instagram_accounts and instagram_accounts.
However, if I try to access the same account IDs based on the Marketing API definition, I get complementary results:
page_backed_instagram_accounts=#<Hashie::Mash data=#<Hashie::Array [#<Hashie::Mash id="964...289">]>
#<Hashie::Mash follow_count=0 followed_by_count=0 has_profile_picture=true id="964...289" is_private=false is_published=false media_count=0 profile_pic="https://scontent.cdninstagram.com/..._a.jpg?_nc_ht=scontent.cdninstagram.com" username="...758">
instagram_business_account=#<Hashie::Mash id="178...143">
ERROR: "OAuthException: (#100) Tried accessing nonexisting field (follow_count) on node type (ShadowIGUser)"
instagram_accounts=#<Hashie::Mash data=#<Hashie::Array [#<Hashie::Mash id="423...525">]>>
#<Hashie::Mash follow_count=J followed_by_count=K has_profile_picture=true id="423...525" is_private=false is_published=true media_count=1 profile_pic="https://scontent.xx.fbcdn.net/...a.jpg?_nc_cat=104&_nc_ht=scontent.xx&oh=d7ef...2dc&oe=5D0006BC" username="<public handle>">
connected_instagram_account=#<Hashie::Mash id="178...143">
ERROR: "OAuthException: (#100) Tried accessing nonexisting field (follow_count) on node type (ShadowIGUser)"
As you can see in the second example, the Marketing API can access page_backed_instagram_accounts and instagram_accounts but not instagram_business_account and connected_instagram_account.
So, from what I can tell, page_backed_instagram_accounts and instagram_accounts are (Marketing API) Ad accounts, which would need to be accessed via the [Marketing API][3].
A couple of other things to note:
- The account in page_backed_instagram_accounts appears to have an automatically generated username, is not published (
is_published=false
).
- While account in instagram_accounts has the same username as the account in instagram_business_account and connected_instagram_account, it actually has a slightly different
followers_count
, follows_count
, and a different ID.
- The Instagram API reports against node type
InstagramUser
while the Marketing API reports against node type ShadowIGUser
.
I believe that page_backed_instagram_accounts contains an automatically generated Ad Account for all accounts just in case there is no other Ad Account associated with an Instagram account. Still, it would be good to see a more definitive set of definitions for these fields returned for a Facebook page via the Graph API.