0

I'm new to development with Facebook SDK. What I wanna do is pretty simple : I want to get all of the user's friends who are using my app, and display them in a ListView. I haven't found the answer in the official documentation.

Currently, this is what I'm doing :

Session.openActiveSession(this, true, new Session.StatusCallback() {
            @Override
            public void call(Session session, SessionState state, Exception exception) {
              if (session.isOpened()) {
                  Request.executeMyFriendsRequestAsync(session, new Request.GraphUserListCallback() {
                    @Override
                    public void onCompleted(List<GraphUser> users, Response response) {
                        if(response.getError() == null) {
                            ...

                        }
                        else {
                            Toast.makeText(getApplicationContext(), "Connectivity error.", Toast.LENGTH_LONG).show();
                        }
                    }
                  });
              }
            }
          });

Thank you.

Romain Pellerin
  • 2,360
  • 3
  • 23
  • 35

0 Answers0