Skip to content

Commit

Permalink
Update get_access_token.py to be parametized.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Jun 30, 2011
1 parent 7156e05 commit 54933e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions get_access_token.py 100644 → 100755
Expand Up @@ -26,13 +26,15 @@

import oauth2 as oauth

import settings

REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token'
ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token'
AUTHORIZATION_URL = 'https://api.twitter.com/oauth/authorize'
SIGNIN_URL = 'https://api.twitter.com/oauth/authenticate'

consumer_key = 'fescFXii74Ow0E8y1kNCg'
consumer_secret = 'hAv4Q2uhS5l6FjrNt0YieE0ezb7mWHcTMLMlxKknrs'
consumer_key = settings.FEEDS[0]['twitter_auth']['consumer_key']
consumer_secret = settings.FEEDS[0]['twitter_auth']['consumer_secret']

if consumer_key is None or consumer_secret is None:
print 'You need to edit this script and provide values for the'
Expand Down
2 changes: 2 additions & 0 deletions settings.py
Expand Up @@ -9,8 +9,10 @@
'apikey': 'TKTK',
},
'twitter_auth': {
# Note: these consumer keys need to be repeated for each feed (could be refactored)
'consumer_key': 'TKTK',
'consumer_secret': 'TKTK',
# Get access tokens using the get_access_token.py script
'access_token_key': 'TKTK',
'access_token_secret': 'TKTK',
}
Expand Down

0 comments on commit 54933e3

Please sign in to comment.