Facebook Graph API - Page request limited reached but have page_engaged_users - facebook

I'm developing an application that manages 100+ Facebook pages. On some page I'm getting the following error:
{
message: '(#32) Page request limited reached',
type: 'OAuthException',
code: 32,
fbtrace_id: 'CzEElQoxHuu'
}
The pages that display this message have page_engaged_users over the previous 24 hours.
I understand that from here if I have a single page_engaged_users I should be able to make 4800 requests. However each Facebook Page is making a max of 390 API requests per 24 hours.
Does anyone know that if I have at least one page_engaged_users in the previous 24 hours I can make up to 4800 requests?
I can't seem to find any contact information for Facebook to support ticket forum etc.

Related

An unknown error has occurred with graph Facebook

I have an element on my website which shows facebook posts from a page and the amount of views/likes/comments. This stopped working all of a sudden and I have no idea why.
If I make the request with the graph api tester tool I get:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1,
"fbtrace_id": "CIHVxFhXIv/"
}
}
This is the request link I use with file_get_contents:
https://graph.facebook.com/v3.0/idofmypage/posts?fields=comments,full_picture,likes,message,picture,story,permalink_url,updated_time,from,insights.metric(post_impressions)&access_token=myaccesstoken
Did something change again with permissions or maybe a field is deprecated?
According to this fb new the Pages API and others have changed, and now you can only access the data if it's a page of your own.
Pages API: Until today, any app could use the Pages API to read posts or comments from any Page. This let developers create tools for Page owners to help them do things like schedule posts and reply to comments or messages. But it also let apps access more data than necessary. We want to make sure Page information is only available to apps providing useful services to our community. So starting today, all future access to the Pages API will need to be approved by Facebook.
Today I've started a project wich, in the begging, I need to recollect data and that's what I've found about it..

Retrieve Facebook Insights older than 3 months with Graph API

I am using Facebook Graph API to retrive page insights information. My issue is that I can't get the ones older than 3 months. For example if I use /insights/page_fan_adds/day?since=2013-01-20&until=2013-04-23 is all working fine but if I use /insights/page_fan_adds/day?since=2013-01-19&until=2013-04-23 (one day before the previous since) I receive the following error:
{
"error": {
"message": "Unsupported operation",
"type": "FacebookApiException",
"code": 100
}
}
This means is not possible to get older information from the facebook page insights or I have to do something else like for example use some permissions or use other syntax?
Facebook will not allow more than 89 days, but you can adjust the since/until fields to get data older than 89 days.
Facebook will return up to 93 days of insights data. You can verify this for yourself by experimenting with the since and until fields.
If you need more than 93 days, as suggested in another answer, you'll have to modify the since and until fields to get different "windows" of data. Note that in the data returned by Facebook, paging URLs are included for your convenience. You can use them instead of reconstructing the URLs if you so desire.

Application request limit reached for facebook

I got this error for some reason:
{
"error": {
"message": "(#4) Application request limit reached",
"type": "OAuthException",
"code": 4
}
}
From my investigation, daily request limit seem to be 100m requests. The Insights -> Developer -> Activity and Errors does not update in realtime (lagging by 4 days), there isn't any restrictions/throttling/errors to speak of. The highest request rate I had was on 21st, and it is 500k and I don't think i got any request limits reached errors (error highest was 1000 errors that day).
Any idea what I could be doing to resolve this? Or at least find out what limits are to my app?
I have same error.
I think there is a facebook bug: https://developers.facebook.com/bugs/442544732471951?browse=search_50bc5133cf13d5c74557627
Please subscribe to this error to solve it quickly...
Quote from here: Facebook Application Request limit reached
There is a limit, but it's pretty high, it should be difficult to hit unless they're using the same access tokens for all calls and not caching results, etc. It's 600 calls per 600 seconds per access token.

Facebook graph API 'friends' request now only returning 25 friends per page? What's going on?

My application(game) has been running on Facebook for some time. I start by requesting a friends list via the graph API call: my-uid/friends
asking for user name and profile pic.
Normally I get back a list of all my friends up to a few thousand, until it starts putting friends on to the next page. Which is nice as most of my users get friends in 1 call.
Suddenly however, and with no changes to the app. about 40 minutes ago (18:40 Tuesday (PDT) - 2nd May 2012) I started getting responses with only 25 friends per 'page'!
I can still get my whole friends list using multiple calls, but the game is not currently set up to do that properly. Can anyone tell me why the sudden change? Anyone else seen similar problems and how do I get the list to give me up to 5000 friends per page like it used to.
Reproducible using the Graph API Explorer
I don't know what else to tell you; perhaps the default number returned has changed, but when I try, a call to /me/friends?limit=5000 returns the full list for me (but my friends list is >500 and < 1000 , so maybe it cuts off somewhere along the way)
(Side note: the average number of friends has been found to be ~190 so presumably most users will have less than 500 anyway, and having to page above 500 would be an edge case
In SDK 4.7 you need to pass in a bundle with the number of friends you want to return, I have set it to 5000 as this is the maximum number of friends you can have on Facebook.
You also need to set up your app as a game in the facebook dev console and use invitable friends to get a full friends list
Create your bundle
Bundle bundle = new Bundle();
Add params to your bundle
bundle.putInt("limit", 5000);
Then pass it in to your GraphRequest
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/me/invitable_friends",
bundle,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
//Do something with the response
}
}
).executeAsync();
It seems that facebook changed its limit to 25 results in other api calls too (feed, posts, friends, etc), if you request friends without parameters the JSON response shows the following:
"paging": {
"next": "https://graph.facebook.com/USER_ID/friends?format=json&limit=25&offset=25&__after_id=LAST_ID"
}
Anyway you could/should always set limit & offset parameters to prevent this kind of things, limit = 0 will return all your friends list.
https://graph.facebook.com/USER_ID/friends?limit=0
If you are only requesting friends from a normal user the maximum number allowed is 5,000 so the limit should could be either 0 or 5,000 if you are requesting info from a facebook page or other kind of api calls like posts or feed this limit could increase or decrease.
(Update) Facebook fixed this bug so setting limit to 0 returns 0 friends, you should set a positive limit, thanks Dinuz
I think the best thing you can do is to add limit=5000 parameter as Igy says.
However I posted a bug report since this change wasn't noticed or described in the document.
The number of results returned from the /v2.2/me/friends endpoint now defaults to 25.
Friend list now only returns friends who also use your app: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app.
See Facebook changes
Facebook API change log
If you are using GraphRequest() (e.g. in React Native), you can put it directly in the string field, like so :
new GraphRequest(
'/me',
{
accessToken,
parameters: {
fields: {
string: 'id,email,first_name,last_name,friends.limit(5000)'
}
}
...

Facebook Oauth 2.0 and rate limiting

I am trying to extract Facebook ids from a list of emails using the url:
let url = "https://graph.facebook.com/search?q="
+ email.Replace("#","%40")
+ "&type=user&access_token="
+ facebook.Token
After around 600 id extracts I get the error "The remote server returned an error: (400) Bad Request.". Is the facebook API/Search rate limited? If so where is the doc?
Facebook limits you to 600 calls/600 sec - but it does reset after 10 minutes. I can't find the documentation at the moment, but I was told this at a Facebook developer garage