From 62dd2b2c6971176518a42b60f3474868627e9bed Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Sat, 26 Aug 2017 13:38:26 -0700 Subject: [PATCH] facebook: upgrade Graph API from v2.6 to v2.10 https://developers.facebook.com/docs/apps/changelog#v2_10 --- README.md | 2 ++ oauth_dropins/facebook.py | 8 ++++---- oauth_dropins/webutil | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b7b30cb8..e4b6b8f6 100644 --- a/README.md +++ b/README.md @@ -318,6 +318,8 @@ Changelog --- ### 1.8 - unreleased +* Facebook: + * Upgrade Graph API from v2.6 to v2.10. * Flickr: * Fix broken `FlickrAuth.urlopen()` method. * Medium: diff --git a/oauth_dropins/facebook.py b/oauth_dropins/facebook.py index 3e58ba58..fb4dd09e 100644 --- a/oauth_dropins/facebook.py +++ b/oauth_dropins/facebook.py @@ -22,13 +22,13 @@ from google.appengine.ext import ndb -API_BASE = 'https://graph.facebook.com/v2.6/' +API_BASE = 'https://graph.facebook.com/v2.10/' # facebook api url templates. can't (easily) use urllib.urlencode() because i # want to keep the %(...)s placeholders as is and fill them in later in code. # https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow#logindialog GET_AUTH_CODE_URL = str('&'.join(( - 'https://www.facebook.com/v2.6/dialog/oauth?' + 'https://www.facebook.com/v2.10/dialog/oauth?' # https://developers.facebook.com/docs/reference/login/ 'scope=%(scope)s', 'client_id=%(client_id)s', @@ -46,8 +46,8 @@ 'client_secret=%(client_secret)s', 'code=%(auth_code)s', ))) -API_USER_URL = API_BASE + 'me?fields=id,about,bio,cover,email,gender,link,location,name,public_key,timezone,updated_time,website' -API_PAGE_URL = API_BASE + 'me?fields=id,about,bio,cover,description,emails,general_info,is_published,link,location,name,personal_info,phone,username,website' +API_USER_URL = API_BASE + 'me?fields=id,about,cover,email,gender,link,location,name,public_key,timezone,updated_time,website' +API_PAGE_URL = API_BASE + 'me?fields=id,about,cover,description,emails,general_info,is_published,link,location,name,personal_info,phone,username,website' API_PAGES_URL = API_BASE + 'me/accounts' diff --git a/oauth_dropins/webutil b/oauth_dropins/webutil index ec2a464a..9841b290 160000 --- a/oauth_dropins/webutil +++ b/oauth_dropins/webutil @@ -1 +1 @@ -Subproject commit ec2a464ae5be21dccbf233373d42c2151de06b58 +Subproject commit 9841b29084acaa2e70aca14bcbb39726269ce4ba