Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8942789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:36:24+00:00 2026-06-15T11:36:24+00:00

After user accept to sign in with his facebook account, my app callback will

  • 0

After user accept to sign in with his facebook account, my app callback will be called by facebook, I’ve noticed that facebook didn’t retrieved user email, although in the configuration of omniauth, I’ve listed email in the permission list like this:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :facebook, omniauth_app_id, omniauth_app_secret_id,
           :scope => 'email,user_birthday,read_stream', :display => 'popup'
end

I am expecting to find email in request.env['omniauth.auth']['extra']['raw_info']['email'] or request.env['omniauth.auth']['info']['raw_info']['email']
But, its not there .. in fact, its not in any attribute within the request object!

Any idea ? is it related to my app facebook settings ?

EDIT

Here is the call back result from Facebook:

puts auth.inspect

#<OmniAuth::AuthHash credentials=#<Hashie::Mash expires=true expires_at=1353164400 token="***"> extra=#<Hashie::Mash raw_info=#<Hashie::Mash first_name="***" id="***" last_name="***" link="***" locale="ar_AR" name="***" timezone=2 updated_time="2012-11-17T13:01:59+0000" username="***" verified=true>> info=#<OmniAuth::AuthHash::InfoHash first_name="***" image="***" last_name="***" name="***" nickname="***" urls=#<Hashie::Mash Facebook="***"> verified=true> provider="facebook" uid="***">

I have replaced reall data with *, but, you can see that the email data is missing ..

EDIT2

Here is my gems used at Gemfile
gem ‘devise’

gem 'omniauth'
gem 'omniauth-facebook', '1.4.0'

gem 'oauth2'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:36:25+00:00Added an answer on June 15, 2026 at 11:36 am

    Ok, I found it! Here is what facebook says here

    By default, calling FB.login will attempt to authenticate the user
    with only the basic permissions. If you want one or more additional
    permissions, call FB.login with an option object, and set the scope
    parameter with a comma-separated list of the permissions you wish to
    request from the user.

    So, I have to add ’email’ like this:

     FB.login(function(response) {
       // handle the response
     }, {scope: 'email,user_likes'});
    

    Thanks very much for all people who tried to help 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need an event/events that will do the following: After user selects text/DOM element,
After following: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview I can sign up a user via Facebook. But I'm struggling
Here is my situation-- I created a registration activity that will accept user's data
In my app after user press start button I execute some code in for
I am customizing the confirmation email sent after user registration. My problem is that
Inside my Controller i have function that runs after user clicks on item, which
I have pay now form on my page and after user finishes his payment
My application will basically accept user input via the main(String[] args) method. I have
My app is a goal-setting workshop. The user describes his life goals, and then
I have several methods that I've used previously to accept user input and return

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.