From: Matías Aguirre Date: Sat, 21 Apr 2012 23:38:09 +0000 (-0300) Subject: Check data type. Closes #322 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=cd085afc7ff8c8fc2bb2e0e768b3d3a2a06a5e2c;p=django-social-auth.git Check data type. Closes #322 --- diff --git a/social_auth/backends/facebook.py b/social_auth/backends/facebook.py index ac7e56f..cdf1cf6 100644 --- a/social_auth/backends/facebook.py +++ b/social_auth/backends/facebook.py @@ -104,7 +104,7 @@ class FacebookAuth(BaseOAuth2): access_token = response['access_token'][0] data = self.user_data(access_token) - if data is not None: + if isinstance(data, dict): data['access_token'] = access_token # expires will not be part of response if offline access # premission was requested