Posts Tagged ‘Terminal’
Twittering via the Terminal
Ok… Quick note people.
Warning!! Extremely geeky. Don’t bother reading if you aren’t !!!
Thanks to Thameera for this tip. Then after a bit of searching I fount this. Thanks to him too. Ok. This is twittering via the terminal for Linux. First things first. You need curl for this. Install curl with the following command.
sudo apt-get install curl
Then open the text editor. Copy and paste the following code.
curl --basic --user "<User>:<Password>" --data-ascii "status=`echo $@|tr ' ' '+'`" "http://twitter.com/statuses/update.json"
Replace the <User> and <Password> with your username and password. Mine would be…
curl --basic --user "chathuraw:*********" --data-ascii "status=`echo $@|tr ' ' '+'`" "http://twitter.com/statuses/update.json"
Save the file as twitter. Now you have to move this file to /usr/local/bin.
sudo mv twitter /usr/local/bin
Then you have to give this file executable permissions as follows.
sudo chmod +x twitter
Well that’s it. Now you can just open a terminal and type twitter and tweet to your hearts content.
$ twitter "tweeting via the terminal.... Sooo frikkin awesome"
Cheers!!!
UPDATE : Another cool python script for Twittering from the terminal. I didn’t check this out yet though. http://jspr.tndy.me/2008/05/twitterminal-a-terminal-based-twitter-client-in-python/