0

I am trying to get friend list using me/frineds tag. There is no user of the app so far so i have added some frirneds as a tester of the app. But they are not showing in the response i am getting empty data list. Please guide me what i am doing wrong here. Here is the code

Bundle required = new Bundle();
                required.putString("fields", "id, name, picture.type(square), gender, email");

                //Request for friendlist from facebook
                Request req = new Request(session, "me/friends", required, HttpMethod.GET,
                        new Callback() {
                    @Override
                    public void onCompleted(Response response)
                    {
                         is2=response.getGraphObject();             
                         JSONObject json = is2.getInnerJSONObject(); 
                         readResponse(json);
                         String str = json.toString();
                         saveFileOnSD("data", str);
                        // generateNoteOnSD("frinedresponse", str);
                         Log.v(TAG, str);
                    }
                      });
                Request.executeBatchAsync(req);
user2934930
  • 874
  • 1
  • 11
  • 23
  • Since there are no users that did login with you App youll have no users in the FriendsList , Facebook Changed the privacy and you can return only Friends that made Logn with your Application – Itzik Samara Aug 25 '14 at 12:01
  • But if you add your friend as tester than it will appear in the list. So i have added my friend as a tester but he is not in the friend list response – user2934930 Aug 25 '14 at 12:06
  • possible duplicate of [FBFriendPickerViewController not showing all friends](http://stackoverflow.com/questions/24474124/fbfriendpickerviewcontroller-not-showing-all-friends) – luschn Aug 25 '14 at 13:07

2 Answers2

1

With v2.0, only users who are using the App too show up in the friend list. It is not enough to add someone as Tester in the App Settings, a user has to authorize your App.

See changelog for more information: https://developers.facebook.com/docs/apps/changelog

There is also "invitable_friends" and "taggable_friends", the first one is for game invitations only and the second one is for tagging only.

luschn
  • 68,448
  • 8
  • 104
  • 118
0

This has been previously asked, and the thread listed below has a ton of details. The only work around is if your app is a game. Here is the link to the other post: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

Community
  • 1
  • 1
Rogala
  • 2,457
  • 21
  • 27