Skip to content
Snippets Groups Projects
Commit 06776599 authored by Ben Adida's avatar Ben Adida
Browse files

upgrade google APIs

parent 451b6b8f
No related branches found
No related tags found
No related merge requests found
......@@ -50,11 +50,11 @@ def get_user_info_after_auth(request):
# get the nice name
http = httplib2.Http(".cache")
http = credentials.authorize(http)
(resp_headers, content) = http.request("https://www.googleapis.com/plus/v1/people/me", "GET")
(resp_headers, content) = http.request("https://people.googleapis.com/v1/people/me?personFields=names", "GET")
response = json.loads(content)
name = response['displayName']
name = response['names'][0]['displayName']
# watch out, response also contains email addresses, but not sure whether thsoe are verified or not
# so for email address we will only look at the id_token
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment