Frage

I've started making the upgrade to Facebook SDK 3.0 for Android. I've managed to open an active session (using the Session.openActiveSession(...) method) and get the current user's info (using the Request.executeMeRequestAsync(...) method). However! When I try to get the current user's list of friends as follows...

Request.newMyFriendsRequest(
    Session.getActiveSession(),
    new Request.GraphUserListCallback()
    {
      @Override
      public void onCompleted(List<GraphUser> users, Response response)
      {
        // never called
      }
    });

... the onCompleted(...) callback is never called and my user is left hanging, forever. I've checked and my access token is valid and I'm pretty sure no extra permissions are needed to get the current user's list of friends. Any ideas anybody? I'm stuck and Facebook developers bug-reporting is disabled!

War es hilfreich?

Lösung

Calling Request.newMyFriendsRequest just creates the request, it doesn't execute it.

You need to do something like:

Request request = Request.newMyFriendsRequest(...);
request.executeAsync();

or just

Request.newMyFriendsRequest(...).executeAsync();
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top