Facebook (Instagram) Graph API not returning instagram_business_account

Viewed 1069

First of all, let me explain what I have today:

  • I have a access token with the following permissions: email, public_profile, pages_show_list, pages_read_engagement, instagram_basic, instagram_manage_insights
  • I have a valid access token
  • The accounts that I'm trying to access are Business Account or Content Creator account

With that in mind, here's my problem: some users that are connected to my platform simply don't return the instagram_business_account when I'm requesting /me/accounts.

My request is to https://graph.facebook.com/v10.0/me/accounts with the fields id,name,instagram_business_account{id,biography,ig_id,followers_count,follows_count,media_count,name,profile_picture_url,username,website}.

Here's a sample result where both should return the instagram_business_account, because both are connected to Facebook as a Business Account:

{
    "data": [
        {
            "id": "xxxx",
            "name": "xxxxx"
        },
        {
            "id": "xxxxx",
            "name": "xxxx",
            "instagram_business_account": {
                "id": "xxxx",
                "biography": "xxxx",
                "ig_id": 00000,
                "followers_count": 0000,
                "follows_count": 0000,
                "media_count": 0000,
                "name": "xxx",
                "profile_picture_url": "xxxx",
                "username": "xxxx"
            }
        }
    ],
    "paging": {
        "cursors": {
            "before": "xxxx",
            "after": "xxxx"
        }
    }
}

Does anybody have any idea what is the problem happening here?

1 Answers

I figured out the problem. This is a Facebook problem, there's nothing we can do. Instagram is connected on Facebook through instagram_business_account. If this value doesn't exist, that means the account is not connected correctly. The user should reconnect the page https://www.facebook.com/{id}/settings/?tab=instagram_management.

The id value is the one from query result. The second alternative is go to Instagram, go to the profile, click on "Edit Profile" and in "Page", just connect to Facebook again.

With that you will be able to get the correct result.

Related