From b659ed7c29ea2bced6613830ebddd4efcfd09cde Mon Sep 17 00:00:00 2001 From: Paulo Costa Date: Tue, 25 Jul 2017 17:14:05 -0300 Subject: [PATCH] Fetch email, picture and link from facebook. AFAICT, they recently changed their API to skip these fields unless explicitly requested. --- simpleauth/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simpleauth/handler.py b/simpleauth/handler.py index c624e2b..9f86262 100644 --- a/simpleauth/handler.py +++ b/simpleauth/handler.py @@ -462,7 +462,7 @@ def _get_facebook_user_info(self, auth_info, key=None, secret=None): """Facebook Graph API endpoint. https://graph.facebook.com/me """ - resp = self._oauth2_request('https://graph.facebook.com/me?{0}', + resp = self._oauth2_request('https://graph.facebook.com/me?fields=id,name,email,picture,link&{0} ', auth_info['access_token']) return json.loads(resp)