简体   繁体   中英

Facebook Graph API Returns Inconsistent Number of Friends With Facebook Profile

I've noticed that using the new Facebook Graph API to fetch friends of users returns a number of friends that is close to, but not always exactly, the number of friends displayed on the user's profile.

Documentation here: http://developers.facebook.com/docs/api

For example, on that page, I click on https://graph.facebook.com/me/friends , and see the JSON for 477 friends, whereas my profile page on facebook shows a count of 478.

Does anyone know why there is an inconsistency?

如果您有选择退出Facebook平台的朋友,他们将不会出现在API响应中。

After being frustrated by inconsistent friend count, I asked a former Facebook engineer about it. It's a known bug related to their usage of memcached, and is considered too expensive, difficult, or otherwise not worthwhile to fix for now.

My two penneth: I've noticed that the number of friends which is displayed in my profile fluctuates (by 1)! I don't know what the reason for this inconsistency is but I suggest you keep checking that number in your profile regularly and see whether it's the case for you as well.

In terms of the Graph API the discrepancy between the friend count in my profile and in the data returned by the API is 2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM