Created
September 24, 2010 23:59
-
-
Save torrez/596261 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import tweepy | |
import sys | |
import webbrowser | |
arguments = sys.argv[1:] | |
if len(arguments) < 2: | |
print "Missing consumer keys.\n" | |
sys.exit(2) | |
consumer_key = arguments[0] | |
consumer_secret = arguments[1] | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
print "Sending you to: " | |
auth_url = auth.get_authorization_url() | |
print auth_url | |
webbrowser.open(auth_url) | |
oauth_token = raw_input("What was the oauth_token you got back? (It was in the return URL): ") | |
auth.get_access_token(oauth_token) | |
print "Write these down:" | |
print "KEY: %s" % (auth.access_token.key) | |
print "SECRET: %s" % (auth.access_token.secret) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment