Admin of my app but still can't test action - facebook

I am an admin of my app. I am trying to test an action in the graph API explorer and comes back with....
{
"error": {
"message": "(#100) The Action Type namespace:Place is not approved, so app 1456349955xxxxx can only publish to administrators, developers, and testers of the app. User 63114xxxx is not one of those roles.",
"type": "OAuthException",
"code": 100
}
}
The user id is actually my user id. Anyone else struck this?

You should select the app for which you are admin. By default, it uses graph api explorer app.
You can find the app in timeline

Related

Facebook Graph API not working with comments?

I created a page and an app with a Facebook Developer account.
In the Explorer Tool, I can retrieve a list of posts with this query without any issues:
104801368572889/feed?fields=message,attachments&access_token=[token]
However, not so lucky when I try to retrieve the comments associated to a post with this query:
104801368572889_105680201818339/comments?access_token=[token]
That's the error I get:
{
"error": {
"message": "(#200) Missing Permissions",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "AOmx5mNZC9xUFysAWp4oX3s"
}
}
It sounds like this means I don't have permissions. I tried to add all the possible permissions in the Explorer Tool (included the pages_read_engagement that is probably the one required for this API call). However, this doesn't seem to work. I also tried to add permissions in the app from the Developer Dashboard, but this brings me into a long process of information requests and reviews by Facebook. I don't want to go through this process as I'm just doing development at the moment. Isn't there something as a sandbox or development mode, where I can set the permissions that I want?

Can't query instagram user with Graph API

Things were working find until yesterday. I'm developing a simple Instagram app, I made a basic login flow. Now, when I try to log in for the app with a business facebook account I get a message "You don't have any Instagram Business Accounts linked to a Page.", which is funny, because in business account manager, in "Instagram Accounts" tab, I have my business instagram account listed; trying to remove it gives me a message: "This Instagram Account can't be removed because it's already linked to an Instagram business profile.". Great, seems like it SHOULD be working. It isn't but, the second part follows.
I generated an access token for that instagram account for Instagram Basic Display API, queried node https://graph.instagram.com/me, I got my account ID in response. Now, I tried to query the user using Graph API - https://graph.facebook.com/17841431928202825 - but in response I get:
{
"error": {
"message": "Unsupported get request. Object with ID '17841431928202825' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AwbBT4_pYZjEg5HbG1UHYPi"
}
}
For this I'm using an access token generated for the facebook account.
Do you have any idea why the hell it can't see my account both querying the API and from Business manager?

Facebook Graph API throws "User is not admin or developer of this application" exception Error #272

We are building a Facebook app to feed custom audiences from our system. Our clients will login via Facebook and with the token we got we need to manage their ad accounts to upload custom audiences.
We followed these steps:
created a Facebook app.
added Facebook login to our web app with this scope:
'ads_management,manage_pages,business_management'.
collected token from an user who is not the administrator of our
Facebook app.
via Graph API fetched the ad accounts list of the user.
called v2.12/act_{0}/customaudiences?access_token={1}&fields=description.
When we try to reach custom audiences Graph API returns the JSON below:
{
"error": {
"message": "(#272) This Ads API call requires the user to be admin of the application. User is not admin or developer of this application.",
"type": "OAuthException",
"code": 272,
"fbtrace_id": "B+lKfUAU320"
}
}
What we are doing wrong? Why API returns this exception?
Thanks.

Add non-friend tester by Facebook ID to Facebook app

I am developing a Facebook app for a client. I want to add the client as a tester to the Facebook app so he can play around with it and give me feedback. The client and I are not friends on Facebook, so I am trying to add him by his Facebook ID, as instructed in the Add Tester modal.
Add Testers Dialog
When I enter his ID, I get a red x with the error message: "XXXXXXXXXXXX could not be resolved to a valid user ID or name." I have checked that the Facebook ID he gave me is correct via the Facebook Graph API Explorer.
How do I add him using his Facebook ID and get around this problem?
It seems that one must use the username of a person who is not their friend to register that person as a tester for your app. (Thanks #CBroe for asking me to try that.)
Unfortunately, the username field is deprecated in the Facebook Graph API for versions 2.0 and higher:
{
{
"error": {
"message": "(#12) username field is deprecated for versions v2.0 and higher",
"type": "OAuthException",
"code": 12,
"fbtrace_id": "GnJd8sMSb7l"
}
}
As far as I can tell, the best way to get the username from Facebook ID is to browse to https://www.facebook.com/{id} and grab the username from the redirected url, which will be https://www.facebook.com/{username}.

Adding admin to fanpage

I have an app with advanced permission for fanpages.
I was wondering, is there any way possible to add an admin to a fanpage through any API?
It's not possible with regular apps, the app must be whitelisted.
{
"error":
{
"message": "(#100) App must be on whitelist",
"type": "OAuthException",
"code": 100
}
}
Graph api for page
only gives the documentation about fetching admins but there's nothing about adding new admins.
But this should work (though, it gives me "app should be on whitelist" error)
POST admin_id field with valid facebook id to
https://graph.facebook.com/<page_id>/admins,
with a valid page access token (not user access_token)