I tried this.
Get response
{"response":{"status":429},"errors":[{"message":"Rate limit exceeded. Client may not make more than 200 requests an hour."}]}
I only tried several times during different hours. But always get the above message.
The streams/symbol endpoint requires Partner-Level Access now.
The API documentation page has been updated recently. This was one of the things added:
This API end-point is only available through Partner-Level Access
Related
With Microsoft Graph, I can set a subscription on a resource. In my case an event. I am going to be using an admin authenticated account to access multiple calendars.
Is there a way to set a subscription to get notifications on all the calendars the admin can see?
If not, is there a way to send in a block of subscriptions with a single request? Because we are limited to how many requests we can specify in a specific timeframe. (I'm not sure what the limit is) but if I have 500 calendars I need to set subscriptions on so I get notifications of changes, how are you supposed to do this and not get hit by the request per timeframe limit?
Currently, there isn't a way to send multiple subscription creation requests in the same HTTP REST call. Every different resource for which a subscription is being created would have its own HTTP call into the Graph REST API.
You can recommend a "batching" feature (so multiple REST requests can be processed in the same HTTP call to the Graph API) on UserVoice: https://officespdev.uservoice.com/
There is also a consideration that, in my experience, the number of simultaneous subscriptions allowed is around 20, so 500 subscriptions might be out of the question. The best advice I've been given on the subject is to loop through all the objects one at a time to refresh them in sequence. The throttling that follows is a different issue altogether.
When a 429/"Unknown Error" comes back (ie throttling), it comes with a retry-after header which should be observed. I might point out that throttling, for me, is still a huge issue.
There are multiple similar questions, but I could not find any helpful answer.
I have created Facebook application and going to fetch Page/Post data from Facebook on behalf of that application.
- I have special read_insights permissions on Page.
- I created access token with that permission for my Facebook App. (which will be automatically extended).
Today I faced to problem with getting transient errors:
Error, Code: 4, Message: Application request limit reached
Error, Code: 17, Message: User request limit reached
There are answers related these problems (Facebook api: (#4) Application request limit reached , Facebook OAuth Error: Application request limit reached).
According to the Facebook Platform Policy you should contact them,
If you exceed, or plan to exceed, any of the following thresholds please contact us as you may be subject to additional terms: (>5M MAU) or (>100M API calls per day) or (>50M impressions per day).
My App performed 300K calls during week , so it shouldn't exceed these limitations. I have contacted to Facebook but they haven't reply yet.
I would like to know what are the best practices for fetching data from Facebook. I need to fetch
1. /page_id?fields...
2. /page_id/posts?fields...
3. /post_id/likes?fields...
4. /post_id/comments?fields...
5. /page_id/insights/
6. /post_id/insights/
For 2-4 I can't use batch requests because of paginated results, I am taking with limit=100, for 5-6 I have created batch requests with specific insight URLs that I need, and already can't decrease number of calls anymore.
When I faced to
Error, Code: 4, Message: Application request limit reached
I created new App and for fetching Insights I granted read_insights permission by same Facebook user.
Then I faced to
Error, Code: 17, Message: User request limit reached
So I assume that if token would be generated by other user who has read_insights permission to new application it could work.
Can someone suggest what will be best approach to solve my problem? Should I configure multiple Page access tokens for my App (generated by different users) and switch between them when for one of tokens Error #4 or Error #17 is occurred?
Have you tried the following?
Using the realtime updates API to be notified about new posts and new comments on posts, rather than polling
(looks like you are doing this) Ensuring you're using the page access token for a page to fetch data for that page, and not the token of a user or another page
Caching data that's unlikely to change to avoid re-fetching
Requesting multiple posts in a single call rather than one post per call (using the ?ids=x,y,z syntax documented here: https://developers.facebook.com/docs/graph-api/making-multiple-requests )
Using those methods you may be able to avoid hitting this entirely
So I'm struggling to find where this is documented (if at all), but I'm getting the following error message when requesting data from the FB GraphAPI.
"Please reduce the amount of data you're asking for, then retry your request"
The call I'm making is:
/v2.3/user1/posts?fields=object_id&limit=100
If I change it to:
/v2.3/user2/posts?fields=object_id&limit=100
It returns 100 items.
Why would it work for one user, and not the other?
Both requests are authenticated via an access token (not belonging to either user) and I get the same error whether running it from my code, or the Facebook Graph API console of developers.facebook.com
The response from CBroe is correct. Facebook returns this error if it finds that too many internal resources are needed to respond to your request.
Therefore you have to do what the response says: limit it.
This can be done in (afaik) 2 ways:
Use the limit parameter and reduce the amount of responses you expect from the API
Provide a timeframe (using since and / or until) to fetch only data (posts / videos) for a specific timeframe.
We had the same issue as you, but with retrieving videos from a page. Unfortunately using the limit parameter did not work, even when I set it to limit=1. But by using the since / until parameters we finally got results.
Therefore I suggest to implement a timeframe in order to reduce the amount of data, or alternatively, split the amount of requests you make. e.g. if you want all posts from the past 3 months and run into the mentioned error: split your requests in half using since and until. If that still does not work: keep splitting...
=> Divide and conquer ;)
Hope it helps,
KR, ebbmo
Recent bug filed on FB talks about the same error. They seem to accept that this could be a bug, but not much other information forthcoming.
https://developers.facebook.com/bugs/1904674066421189/
There are both app-level and user-level rate limits that are enforced on Graph API calls. In your case, it could be that you've made a large number of calls in a short time with user1.
You can check out this page for more about Facebook's rate limits: https://developers.facebook.com/docs/marketing-api/api-rate-limiting (even though the URL refers to the Marketing API, the information also applies to the Graph API.)
I have tried raising this concern on Facebook/Support/Bugs but they said I should post implementation issues here. I have read it everywhere and it seems to be quiet open issue till now. I am not sure, If this will be solved or not.
So, what we are doing is, we have clients - Android and iOS.
Apps on Android/iOS allows users to login into the app and generate the token on the basis of permissions set we have, and we are passing this token to server for fetching further data as and when required for client. As our userbase is increasing we are getting Application request limit reached quiet often.
We are fetching photos of users and their friends using FQL. So, when parallely fetching photos for around 8-10 different users, we are reaching the Application request limit sometimes, which is quiet random and we are not aware of the actual scenario when it breaks up and how. According to facebook the limit, which is 1M calls per day, but we are hitting around 80K - 1 Lac API calls in a day, but as users are increasing it is stretching a bit further, Less than or equal to 200 approax calls/user. We tried doing batch calls as well and we hit the application request limit as well.
If anyone of you could help us understand the complete concept of API limit and how this can be handled, then we will really appreciate the help. We want to understand how API limit is decided and it's rate is calculated over which interval so that we will be able to configure on our side accordingly.
Earlier in the day, we ran into a unique API call issue. Our server started to break for API calls for user tokens that are with us, we (on our systems, other than server) tried fetching the data for those tokens (Simple calls - /me or /me/home), and it was working alright for us but not for server, then we tried setting up another server and redirected the requests to our new server then this server works well for the same set of users. Not sure, what went wrong in this case and how it breaks up. Please help.
Many Thanks,
Reno Jones
Did you look at the Insights -> Developer section of developer.facebook.com for your app?
This will show you a breakdown per api call, including warnings and ones that are currently being throttled and why.
Also, are you sure you're using User token authorization and not just your App token?
Beyond that, we take the information from Insights to find api calls to cache on our side rather than hitting Facebook every time. You will likely have to do something similar if you're not already. They have limits for calling too often, as well as for requesting too much data. For those, we had to reduce the limits of historical data we requested.
Facebook post..
We have integrated our application with facebook. Everything is working fine and we have observed Feed action request limit reached (341) error.
We have checked the limit in privacy setting having arround 5M. Could you please let us know the limit (number for API's) once so that we will verify properly at our side.
Appreciate the immediate response.
The API limit for Facebook is 600 calls per 600 seconds, per app & per IP. There are also application specific limits for limiting things like Feeds and Requests.
If you are hitting the limit you should seriously optimize your app to make less calls or batch requests.