Facebook App Review instagram_basic not being tested properly - facebook-graph-api

Currently I am trying to get my app approved by Facebook.
My app allows users to connect their instagram account. I use data like instagram_profile_picture and followed_by_count to complete their profile with reliable data.
For that, I request the permission instagram_basic within the Facebook-login process. Obviously the process only works if a instagram account is connected to the Facebook account which they are logging in with.
Facebook rejected my app because they could not test the permission properly. But they say that my screencast shows a valid use case (where my FB account is connected to a instagram account). I have checked the test-user they have used to review my app and it is not connected to a instagram account. What makes requesting the permission pretty useless.
test-user
I thought that Facebook is smart enough to understand that, but I guess that's not the case.
Can anyone help me?

Facebooks test-user-system is a mess. But you have to try (I tried several times) creating an Instagram-account using the fb test user, you should then try to connect the instagram account in the instagram mobile app to the fb test user. This worked out for me.

Related

My website have only login with facebook feature, can I submit it for app review?

I made a website using Django.
The only way to log into it is the facebook login.
When I had to submit my app for review in the facebook developer console. They are asking me testing id and password. Since the only way to login is facebook, and it won't work till they test.
And they are asking how to open this website for testing. It's kind of a loop.
Is there another way out?
I don't want to use other ways of logging in (is in accordance with my idea)
I believe you can test your app with your own login credentials according to Facebook:
You do not need to submit your app if it will only be used in
Development Mode by you or someone with a role on your app. Any
account listed in the Roles tab in your App Dashboard, such as admins,
developers, and testers, can use all permissions but will only be able
to access their own data, that of test users, and test pages belonging
to them.
You can use any of these accounts to test your app and create a
screencast.
See this similar answer.

Get instagram ID from facebook graph API without manage_pages permission

I'm creating an app that's using facebook login to get instagram follower insights. Currently I've followed and and successfully made the soloution written here: https://developers.facebook.com/docs/instagram-api/getting-started/
But here's the problem. Facebook won't approve the "manage_pages" permission for my app. Without manage_pages I have no idea how to get the instagram account id.
I've tried for a couple of weeks now, and facebook won't give any explanation other than "This permission is not required for your app's intended function, or it doesn't appear to enhance the user experience" and then referencing this https://developers.facebook.com/docs/facebook-login/permissions
I currently have a facebook support ticket regarding the issue but they haven't replied for almost 2 weeks. And I'm getting a little desperate.
Using below URL for version 3.0 and 3.2 to get the instagram accounts - It works with "manage_permissions" but without it the response is empty.
me/accounts?fields=name,id,access_token,instagram_business_account{id}
Facebook has finally replied to my support ticket and accepted my app review! The approach and guide I was using above was correct.
I have similar problem to get Instagram Id without extra manage_pages permission. I see no point to ask users for manage page permissions (just read it - its includes ads/create/delete etc permissions, crazy) just to get their Instagram accounts id connected to the page. I've found pages_read_engagement permission will provide this data! So, read only permission fixed my problem. Try it! Its better than manage_pages I guess.

Can't get Instagram Business Account ID through Facebook Graph API

I'm trying to access the media of my Instagram business account through Facebook Graph API. I'm following this guide:
https://developers.facebook.com/docs/instagram-api/getting-started/
I've set up everything as requested: I have an Instagram business account, a Facebook page connected to this account and a Facebook app.
In step 5, when I try to get the Instagram Account ID with
GET /v3.0/{page id}?fields=instagram_business_account
the response I get looks different than the one in the guide. The Instagram business account field is missing, I only get back the ID of the Facebook page, which I already have.
Does anyone have an idea what could be wrong here?
Try the query below with the manage_pages permission.
/v3.0/me/accounts?fields=name,id,access_token,instagram_business_account{id,username,profile_picture_url}
I'm going through the review process and having trouble understand the permissions required to
Get Instagram Business Accounts
Subscribe to instagram_story_insights webhook
I only manage to get 1. by having the manage_pages permission. But I don't want to manage pages, just want to get the Instagram Business Accounts and request insights, feed and profile.
For 2. I only find the /subscribe endpoint and that requires a Facebook Page access token and that is only available with the manage_pages permission.
I was facing this issue since last 2 days and it was started suddenly.
I was able to resolve this issue by doing below steps.
Convert back your Instagram business account to personal account.
Now Convert your personal account to business account through the only facebook web not on instagram native app.
Important: We need to convert personal account to business account through the only facebook.
Hopefully you've figured this out by now. I had the exact same problem as you did where I would only get the id of my page.
The solution was adding the correct permissions to the user access token.
You will need to use a user access token with manage_pages and instagram_basic permissions when you make API calls to
GET /v3.0/{page id}?fields=instagram_business_account
We found that this happens for 2 reasons:
Instagram profile was not associated with Facebook page correctly (i.e. person converted did not have access to your page).
The person who converted Instagram to business and connected to the page is no longer an admin of the page
You connected your page and Instagram using Facebook page settings - that screen definitely does not work.
Make sure that your app has approved business_management permission and that you are asking for it when users authenticate facebook.
In all cases, converting instagram back to personal and then reconverting it to business fixes the issue.
Facebook Graph API 4.0 Only Supports Instagram Business Account. Creator instagram account doesn't work on graph api .
Check out below pics for getting instagram id from graph api
Click to View for Graph API Response
I was able to resolve this by going to the Facebook Page > Settings > Instagram and there I was prompted to "Review connection." I recently added the Instagram account "asset" to a user of our business account, so maybe that caused some need for the connection between the FB Page and IG account to be reviewed. I never received a notification from FB about this and I banged my head against the wall for over a day trying to debug this.
Given the Facebook account has a page (with {page id}) linked to the Instagram account. We managed to obtain ids via Browser (HTTPS Get) with
https://graph.facebook.com/v3.0/{page_id}?fields=instagram_business_account& access_token={Access token with the right permissions}
The token was manually generated using Facebook's Graph Explorer
https://developers.facebook.com/tools/explorer/v2/
Choose "User Token" option and Add the permissions "business_management", "manage_pages" and "instagram_basic" via the UI. Hit "Get Access Token" button to generate the token to be used with the "instagram_business_account" url query above.
To get images from the linked Facebook page, we currently do
https://graph.facebook.com/v3.0/{instagram_business_account}/media?fields=id,name,media_url,media_type,timestamp&access_token={Access token with the right permissions}
BTW, our Facebook account does have an app created under it so we could choose this app in the Facebook Graph API Explorer tool when the UI asked for it.
With the right permissions, one can covert these steps into code.
I am facing the same issue and I think thats because one of these two reasons:
the Graph API has updated its policy and requires all apps to undergo Business verification, which is part of the App Review process. Once your app gets verified then you can make those calls.
Your app is in live mode. Switch it off so it comes in development mode from your app dashboard. now you have access to all the api calls. Select the manage_pages and instagram_basic permissions from the graph api explorer. Now you can make the request.
I was facing same issue but i found the solution. At start be sure your instagram account should business account or Creator account.
And then link it with facebook from Facebook web.
Error only come when we use our personal account instead of Creator or Business.
This is my output now.
Add one more permission to your auth request: pages_read_engagement. No need to have manage_pages or public contents access to get Instagram ID.
I faced the same problem and I have resolved it. Follow the following steps to get the Instagram business ID.
(assuming that you already have an access token)
Step 1: Get the Facebook ID first [ GET v11.0/me?access_token={your_access_token} ]
{
"name": "your facebook page name",
"id": "facebook_page_id"
}
Step 2: Make sure that manage_pages , business_management and instagram_basic permissions are enabled. Can be easily done using Graph API Explorer.
Step 3: Using the Facebook ID we can obtain the Instagram business ID [ GET /v11.0/{facebook_page_id}?fields=instagram_business_account?access_token={your_access_token} ]
{
"instagram_business_account": {
"id": "insta_business_id"
}
}
Step 4: In case you are getting only Facebook ID after hitting the endpoint as mentioned in Step 3 then, using your mobile device switch back to your personal account. Again, enable the business account and make the HTTP request again. This method worked for me in getting the Instagram business id.
Finally solved it. Here is what I did to accomplish it.
I' not using business manager. The problem I was facing because my facebook account was not properly connected to instagram account. I thought I created instagram account with my facebook account so they were connected somehow. It was not the issues. Switching instagram account to business won't work. You need to connect your instagram account to your facebook business page.
Go to your pagee
Go to your page settings
Find instagram > you'll see connect. Here I had some problem connecting to instagram from here by logging in with facebook won't work. Do the traditional email password connection.
Last step if successfully connected it will ask you to switch your account. Click on button and done.
After an entire day searching the web (to no use) and reading Facebook/Instagram API docs (which is sometime misleading) I still could not successfully get the Instagram Business Account ID to make requests that use it, like the ig_hashtag_search request.
That's when I decided to ignore everything on the web, trust God, and start using Graph API Explorer's auto complete to try and make some sense of the whole thing!
It finally worked!
Before getting to the actual steps, make sure both Facebook and Instagram accounts are properly configured as business accounts! I don't know if it is a bug in the Brazilian version of Instagram's website, but the process to convert a regular Instagram account to a business account could only be completed using the native Instagram Android app. Specially the part where you link your Instagram account to a Facebook page that should already exist, and that should already have been created using Meta Business Suite.
Again, for me, as of today, the Public Business Information section was missing from the Brazilian version of Instagram's website!
After having configured and properly linked the accounts, it is possible to make the calls using Graph API v12.0.
Step 1
Access the Graph API Explorer.
Step 2
Add the following permissions:
ads_management
business_management
instagram_basic
public_profile
Step 3
Generate the Access Token using the button on the screen (in the popup, be sure to log in using a Facebook account that has both Facebook Business and Instagram Business accounts properly linked and configured).
Step 4
After obtaining the Access Token, get all Businesses IDs:
GET https://graph.facebook.com/v12.0/me/businesses?access_token=xxx
In the Graph API Explorer, you must type only this:
me/businesses
The response should be something like this:
{
"data": [
{
"id": "BUSINESS_ID",
"name": "Business Name"
}
],
...
}
Step 5
Use the BUSINESS_ID to finally get the Instagram Business Account ID:
GET https://graph.facebook.com/v12.0/BUSINESS_ID/instagram_business_accounts?access_token=xxx
In the Graph API Explorer, you must type only this:
BUSINESS_ID/instagram_business_accounts
The response should be something like this:
{
"data": [
{
"id": "INSTAGRAM_BUSINESS_ACCOUNT_ID"
}
],
...
}
And that's it!
If everything worked as expected, you can use this INSTAGRAM_BUSINESS_ACCOUNT_ID to make the desired requests, such as ig_hashtag_search or recent_media requests:
GET https://graph.facebook.com/v12.0/ig_hashtag_search?user_id=INSTAGRAM_BUSINESS_ACCOUNT_ID&q=DESIRED_HASHTAG&access_token=xxx
In the Graph API Explorer, you must type only this:
ig_hashtag_search?user_id=INSTAGRAM_BUSINESS_ACCOUNT_ID&q=DESIRED_HASHTAG
The response should be something like this:
{
"data": [
{
"id": "HASHTAG_ID"
}
]
}
Hope to have helped! 🙏

Unable to get ad insights in Facebook's Marketing API

As described in the marketing API, I have registered an app got my app key and and id, generated a token with ads permissions, list pages permission as well. The app is not yet submitted for approval.
When I try to get the list of ad accountsz linked to 'me' it returns the array of all ad accounts.
But when I select any of the business accounts (other than my personal Facebook account) and try to retrieve the ads insights API throws exception saying:
but when I try to get the insights, using the python SDK, I get the same error, ex: (#273) This Ads API call requires the user to be admin of the ad account. User is not admin on ad account .
What is surprising is when I use the similar sample page from Facebook-Developers to get insights, it is able to retrieve the ads data for the same account, with my own login itself.
Why would my app be unable to do so?
Is there any such limitation for apps not reviewed?
Update: I seem to have admin access to the ad account as well. Here are some screenshots. (Unless its my dumb day I think something else is going on, but its my fist time with an API like this, so I cant be sure!;) )
Screenshots: GraphAPI Explrer with API call, App Settings, AdAccount Settings
Based on the discussion on question and experience I now have:
API user needs to be an admin of the ad account and of the app if you
wish to use the API.
The ad account needs to be specifically added to the app, in app settings. In developer access an app can only have access to a maximum of 5 ad accounts.
Error messages in Facebook API are misleading more often than not. Fix anything marked in yellow or red anywhere in the portal, to be
sure.
Do read about limits of every API before you use it, all API have different limits and your application design needs to take those into account.
As for the question, yes the issue was the text in red, as pointed out by #CBroe, although the error message was off by a mile and issue occurred only when using our own app.

Trying to get "read_insights" approval from Facebook

I have a webservice which will allow a Facebook user to create an account and create reports/charts of their Facebook Page insights. I am having a problem getting through the FB approval process.
I have my website working. Using my own account, I am able to sign up on my service and pull in all of my Facebook "Pages". And even report page insights on them (e.g. Fans by Country). I suspect I am able to do this since I am an "Admin" (see screen shot below):
When Facebook did a review, it appears they used an account that did not have associated "Pages". They successfully created an account, but they state they were not able to select a profile from within my service (you pick an FB page and then can report on different Page metrics). But this is working for me.
I see there is an area where I can create "Test Users":
And for this Test User I signed in and created a Page for it. It is my understanding these are not "Real FB Accounts". But only used for the approval process. Anyways, should I be providing FB the name of the "Test" account? And they would use this during the approval process?
Facebook's review team is also testing with these "Test Users", as you mentioned correctly those are not real Facebook accounts, rather some dummy users in an isolated system.
From my experience I would recommend you to address this problem to the Facebook developer group on Facebook itself. There are some reviewers from Facebook around who help you very quickly.
Here you go: https://www.facebook.com/groups/fbdevelopers/