First time posting, but I just couldnât find this answer anywhere else and wasted some time figuring it out.
Iâm using the twitteroauth.php library to run all my authentication off the server. My apps are all whitelisted (I found that if I responded to the xAuth rejection letter from my request, reminding the support team that I donât care about xAuth, I just want to be whitelisted, it was done in a matter of about an hour.)
But I couldnât get the email address to come back in the status of the get request in âverify_credentialsâ.
Here is what finally worked, and there is nothing in the code that would prepare you to do this:
//With the token credentials we build a new TwitterOAuth object to validate the credentials found in the database
$connection = new TwitterOAuth(CONST_TWITTER_CONSUMER_KEY, CONST_TWITTER_CONSUMER_SECRET, $oAuthToken, $oAuthSecret);
$status = $connection->get('account/verify_credentials', array('screen_name'=>$oAuthScreenName, 'include_email'=>'true'));
The secret is in the single quotes (double would work as well) around the boolean for include_email. Thatâs it. Ridiculous, but now working. If you leave the boolean as a boolean and not a string, the email request will be ignored.