Empty email field of Firebase Auth User using Facebook Login Integration (Firebase 3.0)
after reading post in firebase-talk google group here https://groups.google.com/forum/#!topic/firebase-talk/gPGNq-IkTLo, I found out the answer. The issue was happened because I'm using "Allow creation of multiple accounts with the same email address" in Firebase Auth sign-in method.
So I change the option into: "Prevent creation of multiple accounts with the same email address" can it's working properly now. It's simple as that. It's true I need more logic to merge accounts having the same email address, but it's okay.
Maybe everyone else having the same issue, can also try this, and hopefully it's solved as well.
Some Facebook accounts are created using Mobile numbers, so whenever we request for email address we get an empty string.
In the following image, you can see that the facebook account can either set their Primary contact as email address or Mobile number. So, if a person has marked mobile number as primary, then their email address can't be retrieved.
In my case, I had forgot to verify my facebook account, so initially my email address wasn't even showing in Primary contact. So, if your not getting email address, then please go over to General settings and see whether primary account is set to email address or not.
I found the same issue, where email was set to "--" on firebase auth. I was missing permission to read email, which I fixed by:
LoginButton mFacebookSignInButton = (LoginButton) findViewById(R.id.facebook_sign_in_button);
mFacebookSignInButton.setReadPermissions("email", "public_profile");
I hope this helps somebody in future having same issue.