从Facebook api获取朋友列表数据 [英] Fetching Friend list data from Facebook api
问题描述
我想要获取用户的friendlist(只是名字和birthdate),而使用
FB.api(/ me / friends,function(response){
if(response&&!response.error) {
/ *处理结果* /
console.log(响应);
}
}
);
}
现在从上面的代码,它给我只有没有朋友在count变量,但在数组的数据变量是空白的。
你不能再让所有的朋友了,只有那些也使用相同的应用此外,由于引入了Graph API v2.0,所有朋友_ *
权限已被删除。
- https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
- https://developers.facebook.com/docs/apps/changelog#v2_0_permissions
/ me / friends
返回还在使用您的应用程序的用户的朋友
在v2.0中,朋友API端点返回还在使用您的应用的人的朋友的列表。在v1.0中,回应包括一个人的朋友。
Since facebook has upgraded their api version according to v2.2 no fql query will be use I 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
/me/friends
returns the user's friends who are also using your app In v2.0, the friends API endpoint returns the list of a person's friends who are also using your app. In v1.0, the response included all of a person's friends.
这篇关于从Facebook api获取朋友列表数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!