Get email twitter account


#1

My question is whether you can get the email that the user has registered on twitter somehow. I have a shop and I would like to store mail when a user logs in with twitter.

I know my English is not very good, but there is a foro in Spanish; D


#2

this is how I have done this in .Net using LinqToTwitter

var twitterCtx = new TwitterContext(authTwitter);
                var verifyResponse =
                      await
                          (from acct in twitterCtx.Account
                           where (acct.Type == AccountType.VerifyCredentials) && (acct.IncludeEmail == true)
                           select acct)
                          .SingleOrDefaultAsync();

                if (verifyResponse != null && verifyResponse.User != null)
                {
                    User twitterUser = verifyResponse.User;
               //assign email to existing authentication object
                    loginInfo.Email = twitterUser.Email;

                }

#3