Sunday, October 10, 2010

Tweeting From the Command Line



A little while ago, Twitter removed the ability to tweet using HTTP Basic Authentication. This killed the ability to use a simple call to curl with your Twitter username and password. Interestingly enough, the November issue of the Linux Journal still mentions using the basic auth method to tweet from a script.

This will not work any longer now that Twitter is officially using the OAuth specification. Fellow CLIer's take heart, however, fortunately there is a way to use OAuth from the command line, it only requires a will and a tweepy. Tweepy is a python module written specifically to allow users to authenticate via Twitter's API and fire off tweets programmatically.

I used the method described here to setup my system checks for my home server. Thus far it's working well.

No comments:

Post a Comment