I have integrated latest Facebook android sdk 4.0. In SDK 3.0+ user\'s email address is retreived using user.getProperty(\"email\") after successful login. I am looking for
In the new facebook graph you need to ask permissions for access that information. for example on the activity you have put the LoginButton you add this line in the OnCreate method
loginButtonFacebook.setReadPermissions(Arrays.asList("public_profile", "email", "user_birthday"));
Then you get that information
loginButtonFacebook.registerCallback(callbackManager, new FacebookCallback() {
@Override
public void onSuccess(LoginResult loginResult) {
GraphRequest.newMeRequest(
loginResult.getAccessToken(), new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject me, GraphResponse response) {
if (response.getError() != null) {
// handle error
} else {
String email = me.optString("email");
}
}
}).executeAsync();
}