使用相同的Parse应用程序查找Facebook好友

时间:2015-05-14 20:10:21

标签: javascript facebook facebook-graph-api parse-platform

我需要找到用户,我正在使用我的应用程序的Facebook好友(我有Android和Web版本)。我可以使用以下代码在Android上完成此操作:

https://parse.com/questions/how-can-i-find-parse-users-that-are-facebook-friends-with-the-current-user

但是没有提到Javascript的方法。

我从其他帖子中看到做过这样的FB api调用:

            FB.api('/me/friends?fields=installed', function(response) {
                var friends = response;


                console.log(friends);
            });
        }

但由于某些原因,我的朋友只回来了7个(即使我只是在搜索/我/朋友时也是如此)。我不确定为什么它没有归还我的整个朋友列表。

1 个答案:

答案 0 :(得分:4)

您不需要fields=installed参数,/me/friends也会返回授权您的应用的朋友。从v2.0起,它不再返回所有朋友,你可以在changelog中阅读更多相关信息。