Written by Sean Behan on Sun Jun 17th 2012

I'm usually at the command line so I wrote a little a bash function so that i can type

tweet this is really neat but kind of pointless
and it will update my twitter status! some characters trip it up but in general it's useful for most of my tweets. The tweet function just spits out the arguments passed to it for the status parameter for the API call to twitter.

Add the following to the .bash_profile file and reload the terminal (don't forget to add your email and pwd where appropriate).

tweet() {
   curl -u your_twitter_email_addr:your_twitter_passwd -d status="$*" http://twitter.com/statuses/update.xml
 }
 

*** Twitter still uses http basic authentication for their API. However, they are moving away from it in favor of oAuth. So I'm not sure how long this fun will last :{


Tagged with..
#api #bash #curl #twitter #Linux #mac os x

Just finishing up brewing up some fresh ground comments...