]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Get the current user's twitter information with /account/verify_credentials.
authorBen Darnell <ben@bendarnell.com>
Sat, 1 Jun 2013 02:27:02 +0000 (22:27 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 1 Jun 2013 02:27:02 +0000 (22:27 -0400)
This is more robust against potentially-changing screen names.

Closes #51.

tornado/auth.py

index 773d9e4824fc17c11ab98b2ca2f1c260b48c68fa..42400e1996b6d5b7d3f6d913eea6d2a9a778fe5a 100644 (file)
@@ -723,7 +723,7 @@ class TwitterMixin(OAuthMixin):
     @gen.coroutine
     def _oauth_get_user_future(self, access_token):
         user = yield self.twitter_request(
-            "/users/show/" + escape.native_str(access_token["screen_name"]),
+            "/account/verify_credentials",
             access_token=access_token)
         if user:
             user["username"] = user["screen_name"]