From: Harmon Date: Wed, 5 Jul 2023 21:27:15 +0000 (-0500) Subject: Improve clarity of OAuth 2.0 User Context example code X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bc5a1d3662bec2bdd0c44283fa818fef6c56e010;p=tweepy.git Improve clarity of OAuth 2.0 User Context example code --- diff --git a/docs/authentication.rst b/docs/authentication.rst index 4e1fa2c..0c556f3 100644 --- a/docs/authentication.rst +++ b/docs/authentication.rst @@ -149,9 +149,10 @@ This can be used to have a user authenticate your app. Once they've done so, they'll be redirected to the Callback / Redirect URI / URL you provided. You'll need to pass that authorization response URL to fetch the access token:: - access_token = oauth2_user_handler.fetch_token( + response = oauth2_user_handler.fetch_token( "Authorization Response URL here" ) + access_token = response["access_token"] You can then pass the access token to :class:`Client` when initializing it::