admin管理员组文章数量:1297016
Hi I am using Facebook API javascript SDK, and trying to get logged in user friends data Here is the scope i am using
FB.login(function(response) {
statusChangeCallback(response);
}, {
scope:'publish_actions,user_friends,public_profile',
return_scopes: true
});
FB.api('/me', function(response) {
$textInput = document.getElementById("searchText");
var request = jQuery.ajax({
type: "POST",
url: "/logged/ajax/facebook",
data: response });
request.done(function( $data ) {
jQuery(".loadingContent").css( "display", "none" );
if($data == "success"){
FB.api('/me/friends', function(data) {
console.log(data);
});
} else {
alert($data);
}
});
request.fail(function( jqXHR, textStatus ) {
});
});
but it returns me
({"data":[],"summary":{"total_count":79}})
data is always empty, though i am getting total count of my facebook friends
Hi I am using Facebook API javascript SDK, and trying to get logged in user friends data Here is the scope i am using
FB.login(function(response) {
statusChangeCallback(response);
}, {
scope:'publish_actions,user_friends,public_profile',
return_scopes: true
});
FB.api('/me', function(response) {
$textInput = document.getElementById("searchText");
var request = jQuery.ajax({
type: "POST",
url: "/logged/ajax/facebook",
data: response });
request.done(function( $data ) {
jQuery(".loadingContent").css( "display", "none" );
if($data == "success"){
FB.api('/me/friends', function(data) {
console.log(data);
});
} else {
alert($data);
}
});
request.fail(function( jqXHR, textStatus ) {
});
});
but it returns me
({"data":[],"summary":{"total_count":79}})
data is always empty, though i am getting total count of my facebook friends
Share Improve this question asked Jan 20, 2015 at 8:09 Anna GabrielyanAnna Gabrielyan 2,1704 gold badges30 silver badges50 bronze badges 1- 1 Possible duplicate of Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app – gak Commented Mar 14, 2016 at 21:44
1 Answer
Reset to default 8Since v2.0, you can only get friends who authorized your App too.
Check out the changelog for more information: https://developers.facebook./docs/apps/changelog
This question is also answered in several other threads already:
- Get facebook friends with Graph API v.2.0
- Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
- Get ALL User Friends Using Facebook Graph API - Android
本文标签: javascriptFacebook Api getting total count of friendsbut not friends dataStack Overflow
版权声明:本文标题:javascript - Facebook Api getting total count of friends, but not friends data - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741620781a2388796.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论