1

I made one android app which will fetch all friends of logged in user of facebook.But it is not fetching all the friends.Can anyone tell what is the issue and help me with the correct process.Right now i am using the below code.

Request rt=Request.newMyFriendsRequest(session, new GraphUserListCallback() {

        @Override
        public void onCompleted(List<GraphUser> users, Response response) {

            if(response.getError()==null){

            ListIterator<GraphUser> graphUser=users.listIterator();
            ArrayList<String> friends=new ArrayList<String>();
            while(graphUser.hasNext()){
                GraphUser friendObject=graphUser.next();
                friends.add(friendObject.getName());
            }
            System.out.println(friends);

            TextView listOfFriends=(TextView) findViewById(R.id.welcome);
            listOfFriends.setText("hello"+friends);
            }
            else{
                Toast.makeText(MainActivity.this, response.getError().getErrorMessage(), Toast.LENGTH_SHORT).show();
            }


        }
    });
    rt.executeAsync();

please suggest me what should i do?

DS Roy
  • 15
  • 4

1 Answers1

2

If you created your app after 04/30/2014, you're forced to use Graph API 2.0, which means you will no longer get a full list of friends. Instead, you will only get friends that are also using your app.

Ming Li
  • 15,672
  • 3
  • 37
  • 35
  • Thanx for your valuable comment.So can you suggest me what should i do for getting full friend list? – DS Roy May 27 '14 at 17:39
  • You can use something like taggable_friends - https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends - but your app's usage of this permission must be reviewed by Facebook. – Ming Li May 27 '14 at 18:19
  • Can you please share guidelines for reviewing application in facebook – DS Roy May 29 '14 at 06:31
  • https://developers.facebook.com/docs/apps/review/login – Ming Li May 29 '14 at 17:14
  • 1.Can you explain about Privacy Policy URL and how to generate it? 2.Can you give some sample Privacy Policy URL? 3.Is it possible to give demo application for review? – DS Roy Jun 06 '14 at 06:26