When I make newMeRequest using Facebook Android SDK
Request.newMeRequest(session, new Request.GraphUserCallback() {
@Override
public void onCompleted(GraphUser user, Response response) {
if (user != null) {
Log.e(TAG, "Logged in..." + user.getName());
} else {
Log.e(TAG, "Logged in... but user==null");
}
}
}).executeAsync();
Logcat says "Logged in.. but user==null"
what should I do?
Maybe you can add a parameter with specific fields :
Request request = Request.newMeRequest(currentSession, new Request.GraphUserCallback() {
....
}
Bundle parameters = new Bundle();
// REQUEST_FIELDS : id,name,email
parameters.putString(FIELDS, REQUEST_FIELDS);
request.setParameters(parameters);
Request.executeBatchAsync(request);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.