What I want to do is to be able to create and publish FB ads from my fb account and publish it on other users fb pages using fb api.
User can install my app which will ask for manage_pages+business_management permission along with some other needed permissions.(this part is done for test app and it's working) and then users can create fb ads on my platform and connect there pages to the ad they have created.
I am able to create fb ads also from my platform but not able to connect users pages to my fb ads.
I have one main account with business manager + app(dev mode) connected to it + system users, test account etc..
so far I have figured out that I have to add the other fb user pages to my business pages and to do that according to the doc, first I have to install the app for system users by using below curl request.
https://developers.facebook.com/docs/marketing-api/businessmanager/systemuser/v2.10
Installing Apps
A system user or an admin system user must install the app that will be used for generating the token. That means to allow the app to call APIs on behalf of this system user or admind system user. Both system user and app should belong to a same business manager
To install an app for a system user you need following things:
* access_token: of an admin user, admin system user, or another system user if generated
* business_app: the app ID being installed
To install an application for system user, make a POST request as shown in the example below:
curl \
-F "business_app=APP_ID" \
-F "access_token=ACCESS_TOKEN" \
"https://graph.facebook.com/API_VERSION/APP_SCOPED_SYSTEM_USER_ID/applications"
This call will return a boolean result indicating installation was successful. If any of the restrictions are not met, you will see appropriate error message.
but it never works...
my first question is before going any further
Is it even possible to install the test app which is always in development mode for system users?
if the answer is "No" then i'll have make my main app live and submit it for review so I can needed permissions which are not there in main app which doesn't sound reasonable to me, I should be able to do this with test app in dev mode.
but if the answer is yes then please let me know how.
When I try I always get this error
Error: Requires business_management permission to manage the object
I have added system user to Advert account as an admin
I have added system user to test app as an admin
I checked business_management checkbox when I created the system user token
any help is highly appreciated!
ps: pls correct me if you think this is not the right way to achieve my goal
Well if someone comes around to this page for looking for an answer then it's damn simple, special privilege is required to do this and you'll have to contact facebook. it's that easy -_-, still haven't got the privilege yet so can't add anything else...
Related
When you're trying to apply for Facebook Permissions for your application, you may encounter some permissions that requires App Review. In my case, I need to use the Facebook Login for Business Accounts, so I need to apply for Facebook's App Review.
In order to make an App Review for Facebook, you will need to provide step-by-steps videos and guides for Facebook testers to test for themselves. However, it does requires a Test User to do this.
A Test User can have a Test Page linked to it, and a Test Page is capable to link an Instagram Account created using this Test User. However, for some reason, I'm not able to convert this created Instagram Account as a Business Instagram Account using the Test User. I tried to link it using my application flow, but the "Convert to Business Profile" button does nothing, and if I try to do this in the Facebook Test Page account, the form that ask for Contact Information always throws a message "An Error Ocurred".
So, I'm unable to create an Instagram Business for testing and also not allowed to provide a real account because they don't allow this, as they explicitly says (Which I can agree with):
Note: Do not provide your personal Facebook account credentials.
As I'm unable to find a way around this, and I can't see to find any answer on the internet... I wonder if somebody could help with this one.
So, it seems it's just a Facebook bug (Just as one I was experiencing before this one, where after updating a Test Account permissions, the permissions were still not working properly) where the Test Account seems to be kind of locked in a state were you can basically do nothing more with it than what you have already done... So I end up creating a new Test Account and doing the same process, but this time it worked.
I had the same problem, and to fix it, I had to follow these steps :
Create a Facebook test user for your app.
Once the user has been created, click the three dots at the right, then edit its password, choose something that you will remember.
login as this test user.
Edit the user parameters and set its email address as main/default contact address (you need to type in the password of the user). It seems, by default, test user do not have default contact and this is required to login with instagram.
Now go to instagram.com, and create a new account using "login with facebook"
Fill in the name, password (you need to remember it), and userid.
Send the form, and you will get some error telling you to retry later. Ignore it, your account should actually be created.
Now switch to the instagram mobile app (web interface might not work, I was stuck in a redirect loop) so you can login to instagram using the email address of the facebook test user account (the one you used in point 4) and the IG password (you typed in point 6).
Hope it helps anyone stuck in this hell like I was for 2 days.
We have a simple app that summarizes the total number of mentions your instagram account gets using the IG-User/tags endpoint on the graph api (https://developers.facebook.com/docs/instagram-api/reference/user/tags/)
The pre-requisite of the app is the user has their fb account linked to their IG - Business or IG - Creator account.
Unfortunately every time we've submitted it for review so far it has come back with the same comment from FB:
"Although we were able to login to your app using the Facebook Login authentication, we were unable to test the steps to connect an Instagram business account. As a result, you'll need to implement an integration flow for an end user to connect their Instagram business account(s)"
Now as I understand it there is no way I can get the user to link their IG account to FB or to a FB page using the API. The "link account" action is purely handled using the Instagram app. Or am I missing something here.
Well after 3 weeks of back and forth with multiple seemingly segmented facebook support teams I have been able to get this permission from them.
Turns out that there's an unexplained flow here:
This is verbatim from the information I received from their chat support (but is not found anywhere in the documentation)
"You have needed to provide Test Users on your App Dashboard, grant the test user the Instagram_manage_comments permission and then provide us with the login details. We would then link that to an internal Instagram Business Account."(sic)
The part where they link an internal business account to the test user happens on their end and outside the scope of the app. I confirmed this and even then I failed the review multiple times because apparently the steps to approve IG business permissions have not been standardized yet and sometimes the approver simply doesn't know what needs to be done. It's a strange state of affairs and the answer it seems is to just keep pushing.
I'm having the same problem and looking forward to see some comments to your post since the first day. But I started to think it will never come.
I believe they want a new user to start with minimum permissions (which is the email permission) and add other permission only as they are needed. This requires a mechanism in your app that guide a new user logged in with only email permission to give other permissions (e.g. taping a button that opens up user’s IG business account needs instagram_basic and manage_pages permissions. Or taping “post comment” button needs manage_comments permission.) So your app should open up a window that the user can give permissions when any of these events fires. (or when user decides to take permission(s) back)
This is what I understand from “steps to connect an Instagram business account”.
But I am not sure if my understanding is correct. I would definitely like to hear if you found any solutions.
I'm also having the same problem as you as I'm developing similar service to IGBlade (https://igblade.com) & Social Blade (https://socialblade.com).
I'm beginning the wonder if I should change my app review request so that I would inform Facebook that the permissions my app is requesting work serverside and therefore there's no need to implement an integration flow for an end user to connect their Instagram business account(s) to my app.
Any thoughts?
Here is what I have done to get the approval
Create a Facebook test user with correct permissions
Log in with this user
Create a Facebook Page
Edit settings on Facebook Page and add Instagram Business account (personal one)
Submit Facebook review with both credentials (Facebook test user + personal Instagram user).
Wait for review and do not forget to change your personal Instagram user password after the review.
I want to make an application that runs in the background on a server, and syncs ad information from Facebook to a database on my server periodically (say once per hour).
The application will have no user interaction at all, meaning there is no user to click "I'm okay with Facebook using my info" every time you need to authenticate.
I found this in their docs: https://developers.facebook.com/docs/facebook-login/access-tokens#apptokens
The problem is, it doesn't seem to work. I can generate an access_token just fine. Example here:
$ curl 'https://graph.facebook.com/oauth/access_token?client_id=123456789012345&client_secret=s3cr3tt0k3n12a4zz1345a6fgx5aa3f6&grant_type=client_credentials'
access_token=123456789012345|SomeRandomLettersAndNumbers
However, when I go to use it I just get permission denied errors:
$ curl 'https://graph.facebook.com/v2.6/me/adaccounts?access_token=123456789012345|SomeRandomLettersAndNumbers'
{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500,"fbtrace_id":"DQ8ysX2mHCu"}}
Same thing happens when I make the request via their explorer tool found here: https://developers.facebook.com/tools/explorer/
Notes:
I have an app set up.
I am the admin.
I claimed the app on my business account.
I created one ad account.
It is not a Native / Desktop app.
Important one: I can get the info if I use a user token instead of an app token, but this requires me to be on a website, and click through a popup window, which obviously I can't do every hour for my server-side app.
I'm not sure if I have to set the permissions somewhere to allow me to use the access token, or maybe I need to set up a "platform" for my app (none of the available ones seem to fit).
UPDATE:
The answer to this question is to use a system user as documented here: https://developers.facebook.com/ads/blog/post/2016/04/05/system-user-rollout/
I'm in the early stages of building a complex application that will tie into Facebook to customize a story using a Facebook user's personal information. I've successfully been able to request basic permissions, grab their name, and include it in the story.
I'm at the point now where I'd like to include some of the user's photos as well, but I'm running into problems with permissions. When I try to get an access_token using user_photos, I'm told that:
"The following permissions have not been approved for use and will not be shown to people using [APPNAME]: user_photos. Submit them for review or learn more."
If I have a look at my Facebook app settings page, I'm told the approval process can take up to 7 days and requires screenshots, and instructions how a reviewer can test my implementation of the desired permissions.
I don't understand how this is supposed to work. It seems like a chicken and egg situation. How can I build my application if I don't have permission to access any photos through the API? How can they test and determine if they want to give me permissions if I can't build the app they need to test?
Is there some testing or development mode I'm missing? Is there a test user I can use? I've tried creating a testing/development version of the application and granting permissions with an admin user, and still no dice.
Thanks for any help.
That is just a warning. You can always ask any user that have a role on the app for any permission
I have a desktop app which uses a user access token to read the me/feed endpoint and I can see all the posts for the logged in user. If I wanted to simplify deployment to different users I would need to minimise the amount of setup/configuration they did.
Is there a way to access me/feed for a given userid rather than have to setup every user as a developer account and create an app for it?
I have looked at https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0 and it is not obvious to me how to do this.
What configuration / permissions does the user in question need to do to activate this. Which access token should I be using, and will it give access to all the posts in the same way the user access token does.
[EDIT] I have looked at this again and the problem I am having is that when a user (who has a facebook account but is NOT a developer) tries to login to my App (which is in development mode) I get the following error
"App Not Setup: The developers of this app have not set up this app properly for Facebook Login."
Thanks in advance