Wednesday, January 20, 2016

Using birdy to tweet a message

birdy makes it easy to tweet a message:

u:\20-birdy> "Hello World!"

Here's the script (

import os import sys from birdy.twitter import UserClient if len(sys.argv) < 2: print "specify text to tweet" sys.exit() tweet_text = sys.argv[1] tw = UserClient(os.environ['TWITTER_CONSUMER_KEY' ], os.environ['TWITTER_CONSUMER_SECRET' ], os.environ['TWITTER_ACCESS_TOKEN' ], os.environ['TWITTER_ACCESS_TOKEN_SECRET']) = tweet_text)
Experimenting with the twitter API client birdy


No comments:

Post a Comment