Facebook的朋友列表得到 [英] facebook friends list getting
问题描述
'scope'=>'email,user_friends'
$ user_friends = $ facebook-> api('/ me / friends');
结果:
([data] => Array()[summary] => Array([total_count] => 46))
https://developers.facebook.com/docs/apps/上的文档升级#upgrade_v2_0_user_ids 清楚地表示,以2.0版开始的Graph API只返回也使用相同应用程序的朋友。
在你的情况下,没有人您的朋友实际上使用该应用程序,这就是为什么结果数组是空的。
请在下次发布一个至少发布此帖的问题之前,先使用StackOverflow搜索倍。谢谢。
I want to get a list of friends with php. I got the necessary permissions, but I can not get a list of friends.
'scope' => 'email, user_friends'
$user_friends = $facebook->api('/me/friends');
result:
( [data] => Array ( ) [summary] => Array ( [total_count] => 46 ) )
The docs at https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids clearly states that the Graph API starting with v2.0 only returns the friends which also use the same app.
In your case apparantly nobody of your friends actually uses that app, that's why the result array is empty.
Please use the StackOverflow search the next time before you post a question which was posted here at least 100 times. Thanks.
这篇关于Facebook的朋友列表得到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!