开发者

Why I receive "This API call could not be completed due to resource limits"

开发者 https://www.devze.com 2023-01-08 11:30 出处:网络
Facebook.Utility.FacebookException: This API call could not be completed due to resource limits Why I receive thiswhen calling _facebookAPI.Events.GetMembers(eid); Is there any work开发者_Go百科aro

Facebook.Utility.FacebookException: This API call could not be completed due to resource limits

Why I receive this when calling _facebookAPI.Events.GetMembers(eid); Is there any work开发者_Go百科around?

My event has 5000+ users.


I recently started getting this from some FQL queries. For FQL at the least, it appears to be entirely unrelated to response size - I'm able to return much, much more than 5k worth of data.

What did break the limit was including mutual_friend_count in my user query. 500 users-worth would sometimes break the limit, 1000 would most of the time, while I can pull in several thousand if I remove that one column (even if I add 10 more).

For daaku's "is uid x attending event y", you can do this in FQL:

select eid, uid, rsvp_status from event_member where eid = <event id> and uid = <user id>

Or in the Graph API (there are a few other lists on events):

https://graph.facebook.com/<event id>/attending

Both of those methods allow limit / offset, which will get past any such limits that may still occur:

select eid, uid, rsvp_status from event_member where eid = <event id> and uid = <user id> limit X offset Y
-- or --
https://graph.facebook.com/<event id>/attending?limit=X&offset=Y

And, though I realize this is quite a bit later than when the question was posted: you should be migrating away from the REST API and towards FQL or the Graph API, both of which are far, far more capable than the REST API.


It is currently not possible to get the entire list if it's greater than 5k for performance reasons. Depending on what you want to do with this data, you can instead ask a more limited question of "is uid X attending event Y".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号