Facebook的朋友列表得到 [英] facebook friends list getting

查看:114
本文介绍了Facebook的朋友列表得到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要获得一个有php的朋友列表。我获得了必要的权限,但我无法得到一个朋友列表。



'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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆