Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do Facebook Graph API calls using field expansion count differently against the rate limits than batch calls

I am looking to optimize my Facebook app.

Today I make a batch call with four graph API calls:

/me
/me/friends
/me/likes
/me/feed

If I change this to a single graph API call using field expansion like this:

/me?fields=id,name,username,friends,likes,feed

Will that now count as one hit against the API instead of four for rate limiting purposes?

like image 773
Rich Sutton Avatar asked Jan 31 '13 13:01

Rich Sutton


1 Answers

Unfortunately, each call in the batch is counted as an api call, it's just faster to call them within a batch since it will be 1 request. See here documentation on Facebook API:

Limits
We currently limit the number of requests which can be in a batch to 50, but each call within the batch is counted separately for the purposes of calculating API call limits and resource limits. For example, a batch of 10 API calls will count as 10 calls and each call within the batch contributes to CPU resource limits in the same manner.

Source: https://developers.facebook.com/docs/reference/api/batch/

like image 178
Kevin Vermaat Avatar answered Nov 16 '22 04:11

Kevin Vermaat