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...");
}
}