user1724216
user1724216

Reputation: 23

Facebook get shares count for each post, got (#613) Calls to stream have exceeded the rate of 600 calls per 600 seconds

We are using graph API to get number of shares for all post on each page of our client, running once per day, we use graph.facebook.com/post_id, but we offen get

(#613) Calls to stream have exceeded the rate of 600 calls per 600 seconds

I tried using batch request, it seems each request in the batch got counted for the limit. Any suggestions?

Here are our findings so far:

  1. FQL stream table doesn't have a field for "shares".
  2. Post insights have no metric matching the "#shares" as show on page wall.
  3. Graph API call for post will reach limit quickly.

Upvotes: 2

Views: 1816

Answers (2)

Carmela
Carmela

Reputation: 687

It doesn't matter if you request by batch, each item will still be counted as one hit and you will reach the same limit. It's indicated in the FB docs

https://developers.facebook.com/docs/graph-api/advanced/rate-limiting

enter image description here

You can try distributing your load by timeout or delay in your cron job or something. Or execute the first batch and the next batch in an hour is probably the safest.

Upvotes: 0

Igy
Igy

Reputation: 43816

Make fewer calls - that's the only real answer here, assuming you've already taken other optimisations, like asking for multiple posts' details in a single call (via ?ids=X,Y,Z syntax mentioned on the homepage of the Graph API documentation)

Why does it need to be done 'once per day'? Why not spread the calls out over a few hours?

Upvotes: 2

Related Questions