-1

I did the following to try and get the user's name using Facebook's Graph API. I have the login button working but the user always appears to be null onCompleted(..)

private void onSessionStateChange(Session session, SessionState state, Exception exception) {
    if (state.isOpened()) {
        Log.i(TAG, "Logged in..." + session.toString());

        // Request user data and show the results
        Request.newMeRequest(session, new Request.GraphUserCallback() {
                    public void onCompleted(GraphUser user, Response response) {
                        if (user == null)
                        {
                            Log.i("", "no!");
                        }
                        else {
                            Log.i("", "YES " + user.getName());
                        }
                    }
                }
        ).executeAsync();

    } else if (state.isClosed()) {
        Log.i(TAG, "Logged out...");
    }
}
  • possible duplicate of [Permission denied (missing INTERNET permission?)](http://stackoverflow.com/questions/25135595/permission-denied-missing-internet-permission) – 323go Jan 19 '15 at 06:23

1 Answers1

0

Found the solution...

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

of course...