0

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?

Community
  • 1
  • 1
Max
  • 9,220
  • 10
  • 51
  • 83

3 Answers3

4

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.

Brent Baisley
  • 12,641
  • 2
  • 26
  • 39
1

I have in my list a account that I see with Graph API. I turn off in this account all apps, and the API continues to see him. Addictionally, all my friends are visible in the same way on my account. Furthermore with the link http://www.facebook.com/ajax/typeahead_friends.php?__a=1&user=myname I was enable to download a page containing all the friends. Only now, https://graph.facebook.com/me/friends?access_token=AAAAA............ is missing of 3 friends of 228, at this time of 229

Giovanni
  • 11
  • 2
0

if you look at FB privacy setting you can do that ... "If you don't want apps and websites to access other categories of information (like your friend list, gender or info you've made public), you can turn off all Platform apps. But remember, you will not be able to use any games or apps yourself."

i suppose that explain missing friends... but you could doublecheck by asking them about their setting

Luca Rocchi
  • 6,272
  • 1
  • 23
  • 23