From bd9fd8a9c2870776bfb91bc95a7d77e080f1992e Mon Sep 17 00:00:00 2001 From: Anand Kumria Date: Mon, 20 Feb 2012 16:24:19 +0000 Subject: [PATCH] As well as returning the access_token, return who it is associated to Returning the access_token is useful, but even more important is knowing which user has granted us access. --- instagram/oauth2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instagram/oauth2.py b/instagram/oauth2.py index 66db8e65..cfd592b2 100644 --- a/instagram/oauth2.py +++ b/instagram/oauth2.py @@ -107,7 +107,7 @@ def exchange_for_access_token(self, code=None, username=None, password=None, sco parsed_content = simplejson.loads(content) if int(response['status']) != 200: raise OAuth2AuthExchangeError(parsed_content.get("message", "")) - return parsed_content['access_token'] + return parsed_content['access_token'], parsed_content['user'] class OAuth2Request(object):