Facebook friend list in Facebook Android SDK 3.14

こ雲淡風輕ζ 提交于 2019-12-08 08:41:32

问题


I am trying to get friend list using Facebook Android SDK 3.14 but getting no results. Some pointed out that friends who are using my app can only be retrieved but I want to retrieve my complete friend list. Can anyone please tell me how can i achieve that?

I am using the following code:

<code>
            Request.executeMyFriendsRequestAsync(session, new Request.GraphUserListCallback() {

                @Override
                public void onCompleted(List<GraphUser> users, Response response) {
                        // TODO Auto-generated method stub
                    Log.i("mustang", "response; " + response.toString());
                    Log.i("mustang", "UserListSize: " + users.size());
                }
            });

Thanks,


回答1:


new Request(
session,
"/me/friends",
null,
HttpMethod.GET,
new Request.Callback() {
    public void onCompleted(Response response) {
        /* handle the result */
    }
}).executeAsync();

Permission: A user access token with "user_friends" permission is required to view the current person's friends.



来源:https://stackoverflow.com/questions/23768419/facebook-friend-list-in-facebook-android-sdk-3-14

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!