空的朋友阵列在facebook open graph api v2 [英] empty friends array in facebook open graph api v2
问题描述
https://developers.facebook.com/tools/explorer?method=GET&path=me%2Ffriends&version=v2.0
我可以得到我的朋友,但是如果我编程该应用程序并进行json调用:
function getUserFriends(){
FB.api('/ me / friends',function(response){
console.log(response);
});
}
friends数组响应是一个空对象。
我正在使用Facebook登录按钮:
< fb:login-button scope = public_profile,email,user_about_me,user_birthday,user_education_history,user_hometown,user_location,user_relationships,user_relationship_details,user_photos,user_friends,read_friendlistsonlogin =checkLoginState();>
< / fb:login-button>
我可以访问很多关于我自己的其他数据,但不是朋友。任何想法我失踪了?
Facebook最近改变了很多事情,为了隐私,您只能获得现在也在使用App的朋友。参见这里:
- https://developers.facebook.com/docs/apps/changelog
- https://developers.facebook.com/docs/apps/upgrading/
另请参见:好友列表不在强大的access_token 之后,t可以再工作了。
I'm trying to pull a list of my friends in Facebook's OG api v2. If I use the explorer here:
https://developers.facebook.com/tools/explorer?method=GET&path=me%2Ffriends&version=v2.0
I can get my friends, but if I program the app and make a json call:
function getUserFriends(){
FB.api('/me/friends', function(response) {
console.log(response);
});
}
The friends array response is an empty object.
I'm using the facebook login button:
<fb:login-button scope="public_profile,email,user_about_me,user_birthday,user_education_history,user_hometown,user_location,user_relationships,user_relationship_details,user_photos,user_friends,read_friendlists" onlogin="checkLoginState();">
</fb:login-button>
and I can access a lot of other data about myself, but not friends. Any idea what I'm missing?
Facebook changed a lot of things recently, for privacy reasons you can only get the friends who are also using the App now. See here:
- https://developers.facebook.com/docs/apps/changelog
- https://developers.facebook.com/docs/apps/upgrading/
Also see here: Friendslist doesn't work anymore after the powerful access_token
这篇关于空的朋友阵列在facebook open graph api v2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!