Fallback to using 'twitter.com' for OAuth.
authorJoshua <jroesslein@gmail.com>
Thu, 31 Dec 2009 18:14:46 +0000 (12:14 -0600)
committerJoshua <jroesslein@gmail.com>
Thu, 31 Dec 2009 18:14:46 +0000 (12:14 -0600)
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
tests.py
tweepy/auth.py

index fff3fde618f311a02e9220718e921628ca40d261..c438efa0e80fff9a25247db47097e00f74580e50 100644 (file)
--- 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]
 ===========================
index 75c02dca2aec4e6898dc2ebec75c60d76274900a..539dc0aa0f5f9a50472d81004f1ca8649bf01b58 100644 (file)
--- 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)
index 6d1004c66da2db810ba6c548aca6a32b8c997c05..7d16f5c521409ec99008925fe95d36a69b948255 100644 (file)
@@ -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):