I have run into a authentication issue using the codebird
function for twitter.
I need to get the E-mail from twitter. I have checked the 'request email address' in the permission section of the API settings in twitter.
here is my function that handles the login :
public function signIn()
{
if($this->hasCallback())
{
$this->verifyTokens();
$reply = $this->twitter_client->oauth_accessToken([
//'include_email' => 'true', //tried this as well without any positive output
'oauth_verifier' => $_GET['oauth_verifier']
]);
//This one rsponded with an auth failure
//$reply = $this->twitter_client->account_verifyCredentials
// ([
// 'include_entities' => 'true',
// 'skip_status' => 'true',
// 'include_email' => 'true',
// 'oauth_callback' => $this->clientCallback
// ]);
if($reply->httpstatus === 200)
{
$this->storeTokens($reply->oauth_token, $reply->oauth_token_secret);
$_SESSION['user_id'] = $reply->user_id;
return true;
}
}
return false;
}
Any help is greatly appreciated.
Thanks in advance.