Email not returned by twitter API even it everyhing is correctly set


#1

Hi,
everything is correct to receive email adress :slight_smile:
(1) checkbox Request email addresses from users is set
(2) access level shows : “Can request a user’s email address”
(3) privacy policy and terms of sevice are set
(4) on the login page it states that application can see email adrees

but when I call account/verify_credentials, there is no email inside it :slight_smile:

any idea ?

thanks,


#2

Are you passing include_email=true when you make the account/verify_credentials request?


#3

yes I Do :

$twClient = new TwitterOAuth($config['consumerKey_twitter'], $config['consumerSecret_twitter'], $_SESSION['token_twitter'] , $_SESSION['token_secret_twitter']);
		//Get OAuth token
		$access_token = $twClient->getAccessToken($_REQUEST['oauth_verifier']);
		//If returns success
		if($twClient->http_code == '200'){

			$userInfo = $twClient->get("account/verify_credentials", ['include_entities' => true, 'skip_status' => true, 'include_email' => true]);

what do you think ?


#4

Try using a string "true"


#5

this one worked for me, great advice.Thanks
$userInfo = $twClient->get(“account/verify_credentials”, [‘include_entities’ => true, ‘skip_status’ => true, ‘include_email’ => ‘true’]);