3

I've set up a basic rails application to use twitter oauth gem and devise and have been able to log in a user. However, my problem is I've now got my app white-listed and I would like to get a user's email back in the response. I've followed all necessary steps on the twitter side (setting necessary permissions, URLS, and reset keys) and have tried passing both

include_email=true

and

include_email=email

as a params when I initiate the oauth sequence. I feel like I've read and re-read the docs and tried few edge cases I thought might work based off of very little I've found on-line.

Any help with this? Something I'm missing if you've done this before?

Lowell Mower
  • 313
  • 4
  • 14
  • Twitter does not give out emails of their users. – Cyzanfar Oct 23 '15 at 02:21
  • 1
    That is not correct. They do you must first white list your application and follow a number of steps including putting a terms of service on your site and also a privacy policy. – Lowell Mower Oct 23 '15 at 12:02

1 Answers1

5

I solved my problem. The omniauth gem was not the latest version which would include email. In my gem file I needed to declare '~> 1.2.1' where I had version 1.2.0 - - the new version includes the following changes you can read about here: https://github.com/arunagw/omniauth-twitter/pull/96

Lowell Mower
  • 313
  • 4
  • 14