-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facebook not always returning email for user? #61
Comments
I saw this happening for the last couple of days. Sometimes first_name is also blank. |
Odd. If it's intermittent, perhaps it is a FB api issue. Does it happen consistently for all users? Could you show me the config you're using? |
Not passing any options other than client_id and client_secret (although using a proc for that because I host multiple domains). Permissions are omniauth-facebook default (I think just |
I'm seeing this problem, too, although it's on a new app and I've never successfully retried the email field. I even tried setting my own email address to be publicly available and I'm requesting it in my provider scope. |
@dpmccabe Does it consistently omit the email? Or is it intermittent? |
Looks like this is potentially a platform issue: Submit your repros so Facebook pays attention! |
I figured out why I've never been able to get the email address. I've been using the JS version of the authorization dialog with the standard page/touch version as a fallback if JS isn't available. You need to specify your permissions scope in the Javascript call to FB.login as described here (under "Permissions"). Merely doing so in the OmniAuth::Builder initializer won't work if you're using the JS SDK. |
Unfortunately that isn't my issue since I use the oauth redirect flow and not the js dialog, and I explicitly request the email permission. Still perplexed by this one. |
I experience the same problem, currently in cca 2% of user registrations. I also don't use the JS dialog login, only the oauth flow. |
Hi. Oauth flow, no js dialog, same issue detected. |
Just saw this for the 1st time a few days back. Facebook returned a large integer in the email field. |
Me too. Just have 100 fb user so far but 2 of them giving null email, 1 of them giving a large integer number as email field. |
We're also getting this. Can't say what percentage of users have this happen as e-mail is a required field for us and e-mail being missing would cause user creation to fail. |
I'm facing same issue but with Twitter, facebook works fine! |
I just had the same issue as phuongnd08, a large int was passed into the email field. |
Bump. Are we certain this is on the facebook side of things? |
I'm of doubt, but developer in other language (PHP) also encountered this issue so the high possibility is yes. My workaround is to render a form where user enter their proper email if the returning value is improper (which is an integer in this case). |
I have just run into this issue too when testing my application on Heroku. The field is returned as one would, or has come to, expect when I am running locally, but is either omitted or returned with a value of undefined on Heroku which leads me to believe this is an issue with their platform. |
+1. I also see this bug once in a while. Impossible to reproduce....it just happens once in a while. |
Same issues with facebook: required email permission, but having users without email from time to time. Frustrating :( |
Same issue here. It sometimes resolved after several hours. But it doesn't help for users who registered during that time.... |
I was just hit with this. What the heck is going on? |
Facebook seems to be marking all of the bugs reporting this behavior as duplicates of this bug that they marked back in Feb, but we need to let them know it is NOT fixed! |
Same here for about 2% of users over 12k |
It's actually quite simple (and I can't believe nobody's figured this out yet... was the first thing I thought of.) Some users have supplied a phone number which facebook uses as it's main authentication method instead of the email address. It's really that simple. I believe the phone number is then encrypted and that becomes what the email address would normally be. (Hence no email address in omniauth facebook.) A simple solution to this is to simply have the user supply an email when oauth doesn't: https://github.com/fertapric/rails3-mongoid-devise-omniauth/wiki/How-To:-Retrieve-email-information-%28middle-step%29-from-providers-like-Twitter-or-LinkedIn |
Same issue is occuring with our Node.js/Express/Passport implementation. Fortunately it is not affecting our app, however we cannot contact the user that does have an email address on record. |
The only way I found to prevent it, is to compose an email based on [username]@facebook.com |
That might work...however I think those type of messages are placed into the 'other' message location which the user is not even alerted to..unless you are their friend. |
@alepee Thats a gr8 idea. Will do it. 👍 |
Good idea but I'm not sure username is a required information for the user. does it work with: |
You should add email to scope or add to facebook api get data |
^ That is not helpful. If a user has their settings set to not supply their email you will get either a null address or an address like 34132142412342@facebook.com if they have messenger enabled. You just have to detect and/or drop the missing address or @facebook.com address, then force the user to supply a valid email if you require it. |
@TeamRainless is right!!! if the user has its phone number set email is not returned I have tested with two accounts one with the phone set and the other one is not, the first one doesn't retrieve the email but the 2nd account does. I guess there is nothing else to do right? UPDATE: |
Case closed
!!!
Thanks with regards,
Praveen Patel
https://in.linkedin.com/in/praveenkaanjna
Mo-09660294530
…On Sun, Apr 9, 2017 at 2:18 AM, dfloresgonz ***@***.***> wrote:
@TeamRainless <https://github.com/TeamRainless> is right!!! if the user
has its phone number set email is not returned I have tested with two
accounts one with the phone set and the other one is not, the first one
doesn't retrieve the email but the 2nd account does. I guess there is
nothing else to do right?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEcBrUBhDjWZJtDmNeokvLNmyHNQStoIks5rt_K5gaJpZM4ACOzb>
.
|
I had two identical Facebook apps: one was returning the email and the other was not (same user). after 3 beers i started trying random stuff, and this one did the trick reset Client Token @dfloresgonz hope it helps |
One of the my friend was trying to the issue from last 5 days. huummm very irritating. which got love in 2 min... Assumption: using PHP for O2Authentication
And job is done. Thanks & Regards |
That worked for me @shahidaali Thank you so much! |
Still am also facing this issue... Please let me know if anyone know to how to fix it... |
Ran into this and the only thing that worked was requesting for permitted fields through the API |
@shahidaali Thank you so much! workaround: |
FWIW, I was trying to debug something similar and found that I was sending the |
Today I was running some tests and I came across the same situation, the user's email was not being returned. Then I realized that Facebook has an option that allows the user to "hide" his or her email, leaving it private, and when the user does it, it is not possible to get the email. |
It's VERY simple: Just create a catch so that, if the email is not
returned, the user must manually input it.
…On Jan 5, 2018 11:35 PM, "João Victor Pereira Santos" < ***@***.***> wrote:
Today I was running some tests and I came across the same situation, the
user's email was not being returned.
Then I realized that Facebook has an option that allows the user to "hide"
his or her email, leaving it private, and when the user does it, it is not
possible to get the email.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADSkd_QAt64JACRNros02S0jURwM2aoFks5tHqOWgaJpZM4ACOzb>
.
|
Se o email vier nulo basta usar o id_do_usuario@facebook.com já ajuda em algo pelo menos. |
Também percebi que se eu solicitasse o perfil publico + email via string array no xml não funcionava, vinha apenas o perfil publico, como o perfil publico já vem por padrao eu retirei as permissões do xml e inseri diretamente no código da classe java só o email. LoginManager.getInstance().logInWithReadPermissions(MainActivity.this,Arrays.asList("email")); E funcionou perfeitamente. |
@steedems No joy for me. I have the same situation, two identical apps, one returns email but one won't. |
@RevealedFrom for the same user asking for the same permissions? |
@simi Yes, testing with the same Facebook user account. Exact same Express app with passport-facebook, and just switching client id and client secrets to test with different Facebook apps. So far, the score is 2 will return emails, and 1 will not. |
Are there any differences between facebook apps configurations? |
Went through page by page, couldn't find any material differences. Anyway, it says email is always approved by default. I wonder what other settings could have prevented email from being sent. From the user side, going to www.facebook.com/settings?tab=applications shows that two apps have the choice of email but one doesn't. |
For me this code worked charm to fetch user info and email. |
I'm now clocking at around 6 hours of debugging, without any luck. Before e-mail was being retrieved, now it isn't. Created test users on Application Dashboard, and nothing. Created a new app for testing only, nothing. The info hash comes with name and image only, no matter what I pass on scope and info_fields. This is the latest code I'm running, but I've tried more then 50 variations of all these parameters. Giving up for the week.
|
@shahidaali could you please take a look? |
My current workaround - terrible, but only way I managed to get an e-mail addres - was using Koala gem, initializing an instance with the
|
After over-reading all comments and becoming increasingly frustrated, I found a quick solution: & passport.authenticate('facebook', { |
thanks @codevanaco , adding it to the scopes did the trick |
By default, the email field will not return unless specified. |
I've looked all over the Facebook docs and can't seem to figure out why, even if I require the email permission, I still sometimes get users who are authorized, but do not have email included in the extra hash. Does anyone have any clue how this is possible and how I can absolutely require an email from Facebook?
The text was updated successfully, but these errors were encountered: