简体   繁体   中英

How can I get an instagram business account with Facebook Graph API?

  • The condition I am using:
    Graph API version: 7.0

  • The problem I have: I can get the Instagram business account of my Facebook developer account, However, I cannot get the Instagram business account when I login Facebook with another account. The account has the permissions below:

    1. The Instagram account is connected to its Facebook page.
    2. The Instagram account is a business profile.
    3. The Facebook account that I want to connect to Instagram account has the authorisation more than editor.
  • I could get this: /me?fields=name,picture , but not /me/accounts?fields=instagram_business_account

I tried with this API: /me/accounts?fields=instagram_business_account{name,username,profile_picture_url},access_token,name,picture{url}', function(response) { } The response I got: { "data": [ ] }

Do I need additional authorisation or something?

Your App is most likely not public and and you need to go through the review process first - with all the permissions you need. Else, it will only work for users with a role in the App.

More information: https://developers.facebook.com/docs/apps/review/

Also, the IG account must be a business account, and it must be connected to the Facebook Page: https://www.facebook.com/business/help/898752960195806

To get Instagram IDs linked to user's pages you need these permissions (verified and approved for your app): instagram_basic , pages_show_list , pages_read_engagement . You can read guide here https://developers.facebook.com/docs/instagram-api/getting-started Everything is correct on that page except extra permission needed to get IG ID: pages_read_engagement

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM