Skip to content

Commit

Permalink
Update Google example to Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
messa authored and singingwolfboy committed Oct 21, 2019
1 parent 36f24b4 commit e5b490c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/examples/google.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ a callback URL then you can try out the command line interactive example below.
... # offline for refresh token
... # force to always make user click authorize
... access_type="offline", prompt="select_account")
>>> print 'Please go here and authorize,', authorization_url
>>> print('Please go here and authorize:', authorization_url)
>>> # Get the authorization verifier code from the callback url
>>> redirect_response = raw_input('Paste the full redirect URL here:')
>>> redirect_response = input('Paste the full redirect URL here: ')
>>> # Fetch the access token
>>> google.fetch_token(token_url, client_secret=client_secret,
... authorization_response=redirect_response)
>>> # Fetch a protected resource, i.e. user profile
>>> r = google.get('https://www.googleapis.com/oauth2/v1/userinfo')
>>> print r.content
>>> print(r.content)

0 comments on commit e5b490c

Please sign in to comment.