Created
February 24, 2013 02:52
-
-
Save acoomans/5022370 to your computer and use it in GitHub Desktop.
Quickstart for authenticating and sending a message using python _twitter_oauth_.
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
# http://pypi.python.org/pypi/twitter_oauth/0.2.0 | |
# pip install twitter_oauth | |
import twitter_oauth | |
print "remember to leave callback blank in twitter settings!!" | |
consumer_key = 'CONSUMER_KEY' | |
consumer_secret = 'CONSUMER_SECRET' | |
get_oauth_obj = twitter_oauth.GetOauth(consumer_key, consumer_secret) | |
get_oauth_obj.get_oauth() |
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
import twitter_oauth | |
import sqlite3 | |
import re | |
oauth_token = 'OAUTH_TOKEN' | |
oauth_token_secret = 'OAUTH_TOKEN_SECRET' | |
consumer_key = 'CONSUMER_KEY' | |
consumer_secret = 'CONSUMER_SECRET' | |
api = twitter_oauth.Api(consumer_key, consumer_secret, oauth_token, oauth_token_secret) | |
api.post_update(tweet=u'Hello, Twitter') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment