0

Recently Twitter updated their API allowing developers to access users' email address.

I'm working on a website application and I'm trying to get the email address from Twitter during the signup process. I have elevated permissions and I set 'include_email' flag to true, but the Twitter API is not sending back any email fields.

Any help is much appreciated.

DanClowdy
  • 31
  • 5
  • possible duplicate of [Any way to get Twitter user email?](http://stackoverflow.com/questions/3372797/any-way-to-get-twitter-user-email) – Alex Tartan Jun 09 '15 at 09:06

1 Answers1

0

I found the problem. I'm using tmhOAuth from https://github.com/themattharris/tmhOAuth and it transforms TRUE to 1 and FALSE to '' (empty string). Twitter API expects include_email=true and the client was passing include_email=1.

Setting true to 'true' (string) did the trick and now it works.

DanClowdy
  • 31
  • 5
  • Do I have to get whitelisted for this, or does it work right out of the box? I have been trying to get whitelisted, but have been getting the run around.. – David P Aug 11 '15 at 13:43