我需要找到用户,我正在使用我的应用程序的Facebook好友(我有Android和Web版本)。我可以使用以下代码在Android上完成此操作:
但是没有提到Javascript的方法。
我从其他帖子中看到做过这样的FB api调用:
FB.api('/me/friends?fields=installed', function(response) {
var friends = response;
console.log(friends);
});
}
但由于某些原因,我的朋友只回来了7个(即使我只是在搜索/我/朋友时也是如此)。我不确定为什么它没有归还我的整个朋友列表。
答案 0 :(得分:4)
您不需要fields=installed
参数,/me/friends
也会返回授权您的应用的朋友。从v2.0起,它不再返回所有朋友,你可以在changelog中阅读更多相关信息。