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
ac5eb801
Commit
ac5eb801
authored
Dec 14, 2014
by
Aaron1011
Browse files
Merge pull request #526 from skoczen/master
Fixes to docs - auth tutorial docs were busted!
parents
6b5482ee
a1bccb80
Changes
2
Show whitespace changes
Inline
Side-by-side
CONTRIBUTORS
View file @
ac5eb801
...
...
@@ -33,3 +33,4 @@ Jeff Hull (@jsh2134)
Mike (mikeandmore)
Kohei YOSHIDA
Mark Smith (@judy2k)
Steven Skoczen (@skoczen)
\ No newline at end of file
docs/auth_tutorial.rst
View file @
ac5eb801
...
...
@@ -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