android-simple-facebook icon indicating copy to clipboard operation
android-simple-facebook copied to clipboard

email = null for com.sromku:simple-fb:4.1.1

Open walaagomaa18 opened this issue 8 years ago • 1 comments

Profile.Properties properties = new Profile.Properties.Builder() .add(Profile.Properties.FIRST_NAME).add(Profile.Properties.GENDER) .add(Profile.Properties.EMAIL).add(Profile.Properties.LAST_NAME) .add(Profile.Properties.BIRTHDAY) .add(Profile.Properties.PICTURE) .build(); mSimpleFacebook.getProfile(properties, new OnProfileListener() { @Override public void onException(@NonNull Throwable throwable) {

                }

                @Override
                public void onFail(String reason) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void onComplete(@NonNull Profile profile) {

                    emailTxt.setText(profile.getEmail());
                    fnameTxt.setText(profile.getFirstName());
                    flnameTxt.setText(profile.getLastName());
                    String gender = profile.getGender();


                }
            });

profile.getEmail() is always null

walaagomaa18 avatar Apr 21 '16 14:04 walaagomaa18

Make sure you have sufficient permissions before calling this. It's working for me. The email might also need to be public or viewable to you.

AllanWang avatar May 30 '16 03:05 AllanWang