From: Marios Date: Mon, 11 Jun 2012 08:41:05 +0000 (-0700) Subject: The way to retrieve the correct value for expires variable depends on whether this X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d954516c71b7f7f2260e73ac4a60ad306716a79a;p=django-social-auth.git The way to retrieve the correct value for expires variable depends on whether this is a normal facebook app or a canvas app. The value is correctly extracted but when it comes time to assign it to our dictionary, the assumption is made that it is a normal facebook app. This breaks canvas apps --- diff --git a/social_auth/backends/facebook.py b/social_auth/backends/facebook.py index b68ae6e..638d8f1 100644 --- a/social_auth/backends/facebook.py +++ b/social_auth/backends/facebook.py @@ -135,7 +135,7 @@ class FacebookAuth(BaseOAuth2): # expires will not be part of response if offline access # premission was requested if expires: - data['expires'] = response['expires'][0] + data['expires'] = expires kwargs.update({'auth': self, 'response': data,