From: Matías Aguirre Date: Thu, 9 Feb 2012 23:30:00 +0000 (-0200) Subject: Protect dict access. Closes #246 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=1455a60977d32c39b649f17cf7676b056b6dd00c;p=django-social-auth.git Protect dict access. Closes #246 --- diff --git a/social_auth/backends/facebook.py b/social_auth/backends/facebook.py index 5fe4d36..108315a 100644 --- a/social_auth/backends/facebook.py +++ b/social_auth/backends/facebook.py @@ -39,7 +39,7 @@ class FacebookBackend(OAuthBackend): """Return user details from Facebook account""" return {USERNAME: response.get('username'), 'email': response.get('email', ''), - 'fullname': response['name'], + 'fullname': response.get('name', ''), 'first_name': response.get('first_name', ''), 'last_name': response.get('last_name', '')}