Created
October 1, 2010 22:39
-
-
Save almet/606998 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 | |
# coding:utf-8 | |
import twitter_oauth | |
# write your oauth token and oauth token secret | |
consumer_key = 'cBqPWLkLtTRM2wbCqH9rIw' | |
consumer_secret = 'mnHm5WBv7ZAOlxKga16dRoouTA2Df9HJmtSO1H0' | |
# create GetOauth instance | |
get_oauth_obj = twitter_oauth.GetOauth(consumer_key, consumer_secret) | |
# get oauth_token and oauth token secret | |
key_dict = get_oauth_obj.get_oauth() | |
# create Api instance | |
api = twitter_oauth.Api(consumer_key, consumer_secret, key_dict['oauth_token'], | |
key_dict['oauth_token_secret']) | |
# post update | |
api.post_update(u'Yeah') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment