]> git.parisson.com Git - django-social-auth.git/commitdiff
The way to retrieve the correct value for expires variable depends on whether this
authorMarios <assiotis@alum.mit.edu>
Mon, 11 Jun 2012 08:41:05 +0000 (01:41 -0700)
committerMarios <assiotis@alum.mit.edu>
Mon, 11 Jun 2012 08:41:05 +0000 (01:41 -0700)
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

social_auth/backends/facebook.py

index b68ae6e4ba292a6b5dd00d58589efa7fcd59daab..638d8f10a2b74c840a9260d831f0bed5b8fcbb3e 100644 (file)
@@ -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,