Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#! /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
You can’t perform that action at this time.