Facebook Graph API Returns Inconsistent Number of Friends With Facebook Profile

自闭症网瘾萝莉.ら 提交于 2020-01-13 18:18:29

问题


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?


回答1:


If you have friends that have opted out of the Facebook Platform, they will not show up in the API response.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/3251626/facebook-graph-api-returns-inconsistent-number-of-friends-with-facebook-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!