Possible Duplicate:
Fetching list of friends in Graph API or FQL – Appears to be missing some friends
My app is using the Facebook Graph API to retrieve the complete list of a Facebook user’s friends:
GET https://graph.facebook.com/123456789/friends?limit=0
(where 123456789 is the user’s id)
Occasionally I’ve observed the issue that one friend is temporarily missing from the result set.
By “temporarily”, I mean: the app would retrieve the list of friends once an hour over a period of several days, and there would be just once instance where one (random) friend is missing from the list. Just like the two users would have “unfriended” each other for only an hour.
This seems to be different from the issue that some friends are permanently and consistently not returned by the Graph API, see this question.
Has anyone observed this issue as well, and is there a way to get a list of friends which is guaranteed to be complete?
Yes, I have seen this before. Facebook doesn’t guarantee 100% accurate data on every call. They have a lot of servers and it’s fairly random which one you will query for data and what state of sync they are in. Aside from that, users can adjust their privacy settings so apps can’t pull their information. Which would cause them to drop out of the list.
You shouldn’t be polling every hour, you should use the real-time updates API (https://developers.facebook.com/docs/reference/api/realtime/). Polling like that puts a lot of load on your server (and Facebook’s) as the number of users increases. It just doesn’t scale and eventually you would exceed Facebook’s limit on how many API requests you can do in a given time frame.