1

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,

Mustansar Saeed
  • 2,730
  • 2
  • 22
  • 46
  • Did you create the app after 4/30/2014 if so you are using API v2.0 which means you only get friends that are using the app. And there is nothing you can do about it – WizKid May 20 '14 at 19:36
  • Yes, i have created after `4/30/2014`. I am afraid, there is no other way which can be used to retrieve friend list. If there is no other way then it means that developers can not implement features which need friend list? Right? – Mustansar Saeed May 20 '14 at 19:42
  • There is no way to get all friends. There are other APIs like invitable friends, taggable friends and social context. – WizKid May 20 '14 at 19:47
  • Can you please give any official comment link which shows that they are not giving the friendlist for the apps created after 4/30/2014 – Mustansar Saeed May 20 '14 at 19:57
  • 1
    https://developers.facebook.com/docs/apps/changelog : "Friend list now only returns friends who also use your app: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app". – WizKid May 20 '14 at 20:11

1 Answers1

0
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.

Yogendra
  • 4,817
  • 1
  • 28
  • 21