From e626b7e5d7e54c4fb666ddf464c6aef11b30b98a Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 31 Dec 2009 12:14:46 -0600 Subject: [PATCH] Fallback to using 'twitter.com' for OAuth. This fixes issue #8 for the time being until Twitter resolves the issue on their end. See issue #1207 on the twitter API tracker. Note: API calls still use 'api.twitter.com', just the initial OAuth setup uses 'twitter.com'. --- CHANGELOG | 2 ++ tests.py | 1 - tweepy/auth.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index fff3fde..c438efa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,8 @@ during upgrade will be listed here. - You may now pass in an optional 'secure' boolean to the constructor which will use https for OAuth requests. Ex: auth = OAuthHandler(token,secret,secure=True) + - Fallback to using 'twitter.com' instead of 'api.twitter.com' + for OAuth until issue #8 is resolved. 1.3 -> 1.4 [current] =========================== diff --git a/tests.py b/tests.py index 75c02dc..539dc0a 100644 --- a/tests.py +++ b/tests.py @@ -315,7 +315,6 @@ class TweepyAuthTests(unittest.TestCase): # test getting access token auth_url = auth.get_authorization_url() - self.assert_(auth_url.startswith('http://api.twitter.com/oauth/authorize?')) print 'Please authorize: ' + auth_url verifier = raw_input('PIN: ').strip() self.assert_(len(verifier) > 0) diff --git a/tweepy/auth.py b/tweepy/auth.py index 6d1004c..7d16f5c 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -37,7 +37,7 @@ class BasicAuthHandler(AuthHandler): class OAuthHandler(AuthHandler): """OAuth authentication handler""" - OAUTH_HOST = 'api.twitter.com' + OAUTH_HOST = 'twitter.com' OAUTH_ROOT = '/oauth/' def __init__(self, consumer_key, consumer_secret, callback=None, secure=False): -- 2.25.1