3
votes

If the limit is 600 request / 600 seconds / access_token

is there a way to find out how many requests I have left until i reach the limit?

I have an app managing several other apps. For each of them I need to get the number of likes and some more info. For this I need a dashboard to know how many requests I have left before reaching the limit.

I tried getting this info from the insights of the app but I really do not know how to approach this. I also had read Facebook graph API Insights requests limit but it didn't help me.

1
developers.facebook.com/docs/graph-api/advanced/rate-limiting: “If your app is making enough calls to be considered for rate limiting by our system, we return an X-App-Usage HTTP header.” - CBroe
thank you, i don't know how i missed that - Bianca Ciurdar

1 Answers

0
votes
  • AS Per doc:

Your app can make 200 calls per hour per user in aggregate. As an example, if your app has 100 users, this means that your app can make 20,000 calls. This isn't a per-user limit, so one user could make 19,000 of those calls and another could make 1,000. This limit is calculated based on the number of calls made in the previous hour.

The number of users for your app is calculated as the average number of daily active users plus today's new logins

Not all API calls are subject to rate limits so the number of calls you make may not match what you see in the rate limit tool. Facebook also throttles calls based on CPU time used and total time. It is difficult to hit these limits, so it is an extremely rare occurrence. This information is exposed in the detail pane for each sample. Click on the graph in the rate limit tool on your dashboard for details.

  • Recommendations:

Rate limiting defines limits on how many API calls can be made within a specified time period. When a rate limit is exceeded, all API calls from an app are throttled and fail for a brief period of time. Once an app is throttled, the caller will get an error for subsequent calls with error code = 4, CodedException. It can take up to an hour for your requests to be accepted again.

  • To avoid rate limiting:

Spread out queries evenly between two time intervals to avoid sending traffic in spikes. Use filters to limit the data response size and avoiding calls that request overlapping data. Use the rate limiting header to dynamically balance your call volume.