本文介绍了从Facebook api获取朋友列表数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
因为facebook已经根据v2.2升级了api版本,否则将不会使用fql查询我想要获取用户的friendlist(只是名字和birthdate),而使用
FB.api(/ me / friends,function(response){
if(response&&!response.error) {
/ *处理结果* /
console.log(响应);
}
}
);
}
现在从上面的代码,它给我只有没有朋友在count变量,但在数组的数据变量是空白的。
解决方案
你不能再让所有的朋友了,只有那些也使用相同的应用此外,由于引入了Graph API v2.0,所有朋友_ *
权限已被删除。
Since facebook has upgraded their api version according to v2.2 no fql query will be useI want to fetch friendlist of user (just name and birthdate) but while fetching the data using
FB.api("/me/friends",function (response) {
if (response && !response.error) {
/* handle the result */
console.log(response);
}
}
);
}
now from above code its giving me only no of friends in count variable but in array of data variable is blank.
解决方案
You're not able to get all friends anymore, only the friends which are also using the same app. Furthermore, since the introduction of the Graph API v2.0, all friends_*
permissions have been removed.
See
- https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
- https://developers.facebook.com/docs/apps/changelog#v2_0_permissions
这篇关于从Facebook api获取朋友列表数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!