Skip to content
Snippets Groups Projects
Commit ac244e10 authored by Andjelko Horvat's avatar Andjelko Horvat
Browse files

authtwitter: update Twitter API endpoint for version 1.1 (issue 517).

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3187 44740490-163a-0410-bde0-09ae8108e29a
parent d316beeb
No related branches found
No related tags found
No related merge requests found
...@@ -94,7 +94,7 @@ class sspmod_authtwitter_Auth_Source_Twitter extends SimpleSAML_Auth_Source { ...@@ -94,7 +94,7 @@ class sspmod_authtwitter_Auth_Source_Twitter extends SimpleSAML_Auth_Source {
SimpleSAML_Logger::debug("Got an access token from the OAuth service provider [" . SimpleSAML_Logger::debug("Got an access token from the OAuth service provider [" .
$accessToken->key . "] with the secret [" . $accessToken->secret . "]"); $accessToken->key . "] with the secret [" . $accessToken->secret . "]");
$userdata = $consumer->getUserInfo('https://api.twitter.com/account/verify_credentials.json', $accessToken); $userdata = $consumer->getUserInfo('https://api.twitter.com/1.1/account/verify_credentials.json', $accessToken);
if (!isset($userdata['id_str']) || !isset($userdata['screen_name'])) { if (!isset($userdata['id_str']) || !isset($userdata['screen_name'])) {
throw new SimpleSAML_Error_AuthSource($this->authId, 'Authentication error: id_str and screen_name not set.'); throw new SimpleSAML_Error_AuthSource($this->authId, 'Authentication error: id_str and screen_name not set.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment