-1

in android application : i want to get a list of all friends of the person who login to my app , not only those who use the app ? i use the following :

private void makeMeRequest(final Session session) {
        // Make an API call to get user data and define a 
        // new callback to handle the response.
        RequestAsyncTask request =new Request( session,
                "/me/friends",
                null,
                HttpMethod.GET,
                new Request.Callback() {

            @Override
            public void onCompleted(Response response) {
                // TODO Auto-generated method stub
                Log.e(LOG_TAG,"Members: " + response.toString());
            }
        }).executeAsync();
    } 

but the response returns empty list , although there are some apps that show person's friend list ,what can i do ??

amr gamal
  • 59
  • 2
  • 7
  • 1
    those are probably apps created before end of april 2014. it is not possible to get all friends anymore, see changelog: https://developers.facebook.com/docs/apps/changelog – andyrandy Sep 24 '14 at 07:42
  • it makes me very sad to know that , but it is applicable in API version 1 so can i make my app uses version 1 , if yes , how to do that ?? – amr gamal Sep 24 '14 at 08:37
  • no, you can´t. only apps created before end of april 2014 can use v1.0 - and only until end of april 2015. – andyrandy Sep 24 '14 at 08:41
  • 1
    i´ve created an answer with some more information, i hope it helps – andyrandy Sep 24 '14 at 08:46
  • 1
    thanks for your help and interest , but unfortunately i am so depressed to know that , the idea of my app was totally depend on this – amr gamal Sep 24 '14 at 09:09

1 Answers1

4

It is not possible to get ALL friends with v2.0+, only with Apps created before end of April 2014 by using v1.0 of the Graph API. And it will only work until end of April 2015. See changelog for more information about the versions: https://developers.facebook.com/docs/apps/changelog

There is also invitable_friends and taggable_friends though, but they are reserved for Apps on facebook.com:

This may also be interesting for inviting friends: https://developers.facebook.com/docs/games/requests/v2.1

andyrandy
  • 72,880
  • 8
  • 113
  • 130