RailsCasts Pro episodes are now free!

Learn more or hide this

Jon Petto's Profile

GitHub User: jpetto

Site: equalpartscreative.com

Comments by Jon Petto

Avatar

Naturally, I figured out the answer immediately after asking for help.

I needed to add the scope parameter to the JS:

javascript
FB.login(
  function(response) {
    if (response.authResponse) {
      return window.location = '/auth/facebook/callback';
    }
  }, { scope: 'email' }
);
Avatar

After dropping down to the 1.4 version of omniauth-facebook, I no longer receive the user's email in the auth hash. I tried adding :scope => 'email' to the OmniAuth provider config, but to no avail.

Anyone have an idea?