Skip to content

Instantly share code, notes, and snippets.

@phil-r
Created June 24, 2014 12:35
Show Gist options
  • Save phil-r/81d83064abd5bb3e5653 to your computer and use it in GitHub Desktop.
Save phil-r/81d83064abd5bb3e5653 to your computer and use it in GitHub Desktop.
tweepy example
# Below is the code to test the twitter auth
from lib import tweepy
consumer_key = 'consumer_key'
consumer_secret = 'consumer_secret'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret, secure=True)
# step 1
# print auth.get_authorization_url()
# print auth.request_token.key, auth.request_token.secret
# step 2
# auth.set_request_token('request_token.key','request_token.secret')
# print auth.get_access_token('verifier')
# profit!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment