sromku / android-simple-facebook

[Deprecated] Simple Facebook SDK for Android
Other
879 stars 349 forks source link

getting null email id on facebook login. How can i get email ID of the user? #397

Open Mayank1904 opened 8 years ago

Mayank1904 commented 8 years ago

Profile.Properties properties = new Profile.Properties.Builder() .add(Profile.Properties.ID).add(Profile.Properties.EMAIL).add(Profile.Properties.NAME) .add(Profile.Properties.FIRST_NAME) .build(); mSimpleFacebook.getProfile(properties, onProfileListener);

OnProfileListener onProfileListener = new OnProfileListener() { @Override public void onComplete(Profile profile) { Log.i("getProfile", "My profile id = " + profile.getId());

     String email = profile.getEmail();}}