1

I have a rails applications, that uses Devise to manage users, now i added OmniAuth to authorise Facebook login and that is the problem, facebook did not return emails.

Here is the data:

               Rails 4.2.4
               ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]
               Devise 2.4.8
               Omniauth-Facebook 2.4.8
               Facebook API 2.5

On my initialisers at devise.rb here is how i'm asking Facebok API for data:

config.omniauth :facebook, ENV["APP_ID"], ENV["APP_SECRET"], scope: 'email', info_fields: 'email, name', :image_size => 'normal'

But FB only send me the user name and the user profile pic but not the email.

i already visited this StackOverflow links:

omniauth-facebook cannnot get email address

Facebook OAuth is not returning email in user info

Omniauth Facebook not returning email and gender rails 4

Ruby on Rails Omniauth facebook doesn't return email

Community
  • 1
  • 1

0 Answers0