PHP Classes

Twitter email

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  Twitter email  >  (Un) Subscribe thread alerts  
Subject:Twitter email
Summary:Hoy to make request for email in Twitter
Messages:5
Author:Jorge Vargas
Date:2016-04-14 19:29:15
 

  1. Twitter email   Reply   Report abuse  
Picture of Jorge Vargas Jorge Vargas - 2016-04-14 19:29:15
About this documentation:

dev.twitter.com/rest/reference/get/ ...

How do you make include_email?

  2. Re: Twitter email   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-04-14 20:12:33 - In reply to message 1 from Jorge Vargas
It seems that you need to ask permission to Twitter to get the user email to Twitter so you can retrieve the email with the user permission.

So you need to contact Twitter and ask to be whitelisted. Read this part that appears in that page:

"Request a User’s Email Address
Requesting a user’s email address requires your application to be whitelisted by Twitter. To request access, please use this form.

Once whitelisted, the “Request email addresses from users” checkbox will be available under your app permissions on apps.twitter.com. Privacy Policy URL and Terms of Service URL fields will also be available under settings which are required for email access. If enabled, users will be informed via the oauth/authorize dialog that your app can access their email address."

  3. Re: Twitter email   Reply   Report abuse  
Picture of Jorge Vargas Jorge Vargas - 2016-04-14 20:53:33 - In reply to message 2 from Manuel Lemos
Thanks. Now I have permissions to get email in my API, but I can't find how to make request of this parameter, if it is via url parameter or how to do it.

Thanks again.

  4. Re: Twitter email   Reply   Report abuse  
Picture of Jorge Vargas Jorge Vargas - 2016-04-16 00:13:30 - In reply to message 2 from Manuel Lemos
Hi. I can't get email with API, can you try please or based on documentation say me how to configure your class?

  5. Re: Twitter email   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-04-16 01:51:32 - In reply to message 4 from Jorge Vargas
If you already obtained a token for the current user, you need to call first ResetAccessToken.

If your application already has permissions to get the email pass this as the parameters value (3rd parameters) to CallAPI for https://api.twitter.com/1.1/account/verify_credentials.json :

array('include_email'=>'true')