Ann*_*yan 5 javascript facebook facebook-graph-api
嗨我正在使用Facebook API javascript SDK,并尝试登录用户好友数据这是我正在使用的范围
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 ) {
});
});
Run Code Online (Sandbox Code Playgroud)
但它回报了我
({"data":[],"summary":{"total_count":79}})
Run Code Online (Sandbox Code Playgroud)
数据总是空的,虽然我得到了我的Facebook朋友的总数
自v2.0起,您只能获得授权您的应用的朋友.
有关更多信息,请查看更改日志:https://developers.facebook.com/docs/apps/changelog
这个问题在其他几个主题中也得到了回答:
| 归档时间: |
|
| 查看次数: |
6663 次 |
| 最近记录: |