From ac244e10bec38d63d67670d36e2c171f04327bda Mon Sep 17 00:00:00 2001
From: Andjelko Horvat <comel@vingd.com>
Date: Thu, 11 Oct 2012 12:28:19 +0000
Subject: [PATCH] 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
---
 modules/authtwitter/lib/Auth/Source/Twitter.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/authtwitter/lib/Auth/Source/Twitter.php b/modules/authtwitter/lib/Auth/Source/Twitter.php
index e021c3349..710055980 100644
--- a/modules/authtwitter/lib/Auth/Source/Twitter.php
+++ b/modules/authtwitter/lib/Auth/Source/Twitter.php
@@ -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 [" . 
 			$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'])) {
 			throw new SimpleSAML_Error_AuthSource($this->authId, 'Authentication error: id_str and screen_name not set.');
-- 
GitLab