Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
e6d1d56d
Commit
e6d1d56d
authored
Dec 14, 2014
by
Steven Skoczen
Browse files
Fixes up outdated(?) docs.
parent
6b5482ee
Changes
1
Show whitespace changes
Inline
Side-by-side
docs/auth_tutorial.rst
View file @
e6d1d56d
...
...
@@ -65,8 +65,7 @@ request token in the session since we will need it inside the callback
URL request. Here is a pseudo example of storing the request token in
a session::
session.set('request_token', (auth.request_token.key,
auth.request_token.secret))
session.set('request_token', auth.request_token)
So now we can redirect the user to the URL returned to us earlier from
the get_authorization_url() method.
...
...
@@ -94,7 +93,7 @@ treasure box. To fetch this token we do the following::
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
token = session.get('request_token')
session.delete('request_token')
auth.
set_
request_token
(token[0],
token
[1])
auth.request_token
=
token
try:
auth.get_access_token(verifier)
...
...
@@ -108,8 +107,8 @@ revokes our application access. To store the access token depends on
your application. Basically you need to store 2 string values: key and
secret::
auth.access_token
.key
auth.access_token
.
secret
auth.access_token
auth.access_token
_
secret
You can throw these into a database, file, or where ever you store
your data. To re-build an OAuthHandler from this stored access token
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment