Posts Tagged ‘Twitter’

Tweet something

September 13th, 2009

It’s easy to tweet from the command-line… Google up some curl command-line application and download it.

curl --user MyTwitterUser:MyPassword --data "source=haStatus&status=This is what I want to tweet" http://twitter.com/statuses/update.json

I have a “source” called “haStatus” (Has Status or Home Automation Status) that is registered with Twitter. If you don’t want to use that one as source, just remove source=haStatus& from the command-line.

Since it’s a quite long commandline I have a small cmd-file that does the trick for me:

@echo off
h:\scripts\bin\curl --user MyTwitterUser:MyPassword --data "source=haStatus&status=%*" http://twitter.com/statuses/update.json

time /T >H:\Scripts\Log\lastTweet.log
date /T >>H:\Scripts\Log\lastTweet.log
echo %* >>H:\Scripts\Log\lastTweet.log