How to get email is using twitter api on callback page using php


#1

i am unable to get email id on callback page using twitter api. please in help me it is urgent.


#2

Email addresses are not available through the Twitter API. If you need a user’s email address, just ask for it.


#3

Hi Arne, is there some sort of security reason? It makes API way less usable for login purposes that way.


How to get email from Twitter Api
#4

There are a variety of reasons. The API itself is perfectly serviceable for sign in (see https://dev.twitter.com/docs/auth/sign-twitter for a complete description) without needing to resort to an email address - why do you claim it is less usable?


#5

In most systems the users are identified by their email address, and most systems also need to send emails to the customers.

If after the authentication we need to ask the user for additional data, the whole one(or two)-click login feeling disappears which might as well lead to simply not using twitter login.


#6

Great answer @Grimor ! Sure it’s less usable since we don’t have access to the user’s e-mail address!


#7

The email address is a great way to uniquely identify users. Also storing the email allows a website’s authentication system not care about what API the user is using to login into their site, wheather it be twitter,facebook, or OpenID. Also, having the email would keep you from incorrectly creating a new account for a user for your site if they happen to use another method of logging in beside twitter. An example of a site that does this is Stack Overflow. It doesn’t care how you login, it still recognizes you as being you.


#8

if we dont have Email address of the users , then how to we send emails to them, many applications requires email address for this purpose.


#9

That’s why you need to simply ask users for the email address if it’s something you’d like to have. Yu won’t get it from us, it’s not part of the data we’ll return to you, and so if it’s important to you, then you need to collect it on your own terms.


#10

i Want to get the email id from twitter using twitter api.plz help me


#11

due to user identification through email, twitter api gets useless if i cant get the email address through it :frowning:


#12

This kind of invalidates any reason to use twitter as sign-up/sign-in method both on the user’s end as well as on the application developer’s end. Its not as though the user wouldn’t be giving permission for this.

Users choose these types of sign-ins to avoid having to fill in long forms with their details. If the details are not available and the user must still supply them, it invalidates the usefulness in terms of a shortcut sign-up/sign-in option.


#13

This is incredibly short sighted, if I have to “ask” for a users email address after they authorize with twitter, why even bother with a pointless process of authorizing with twitter. Its like getting an axe to break into the woodshed so you can get an axe from the toolshed.


#14

this is confusing because a lot of developers see third party oauth techniques as a way to conveniently enable users to skip having to manually provide details such as email addresses, which is why most other third-party oauth providers (e.g. facebook, google) add an extra step where the user can grant permission for the application to access basic account information.


#15

Agreed… a prompt like, do you want to allow this app to access your email address… would be very useful… then, at most, the user has click an ok button… rather than filling out details that could be retrieved from twitter account settings.


#16

In our application, it’s important to match users together based on email address to avoid duplication of accounts between standard login, FB, Google and Twitter. Not having access to the email address when someone is signing in with Twitter makes linking their account much less reliable. This is a clear limitation, and users signing on with Twitter should have the option to share their email address as they do when authorizing in FB and Google.


#17

Twitter signup is useless when we can’t get user email… Hopefully twitter is listening… booooo


#18

Totally agree. This is a useless sign-in method without providing an email address. No wonder it is rarely provided as an option. Until this is provided, Twitter will never be a serious option.


#19

I can’t believe what I am reading here! I just assumed you could get the users’ email like with Facebook sign-in and others. I can remove Twitter as a social sign-in option from my app now again. What a time waster!!
This is completely useless for sign-up/sign-in! Why would I ask the users for their email after they just signed up in my application?? Do as Facebook let the user know during the auth flow, then the user can either take it or leave it.


#20

No way to uniquely identify users across services, without an email address.