I have a rails application and I am using omniAuth to authorise Facebook login and my problem is that Facebook did not return emails.
Here is the data:
ruby '2.1.7'
Graph API V2.5
I have both gems'omniauth'and'omniauth-facebook'installed. is there a specific gem version for 'omniauth' and 'omniauth-facebook' that I should install ?
In my config.omniauth I added
info_fields: 'email
but unfortunately I am still facing the same issue.
I tried these below solutions but none of them worked for me
why facebook email is not retrieved?
I added as well the email as well when calling this function
FB.api('/me?fields=name, email', function(response) {
console.log(response);
'Thanks for logging in, ' + response.email + '!';
});
FYI: I am testing the application with real users whom address emails were verified and when connecting to Facebook I am entering the address email not the phone number.
Any help would be appreciated. Thanks!
尝试检查考拉宝石,您可以指定要返回的版本和字段。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.