The cURL function, found on most UNIX based systems, including the Mac OS, is one of the cooler functions that is also simple to use and awesomely powerful when used correctly. Check out my introduction to CURL for more information about some cool things you can do with it.
Recently I found out that it is simple and relatively easy to post new status updates to twitter through the Terminal using cURL. This opens up the doors for using Applescript, BASH or other languages to automate postings if needed.
So to send a tweet to twitter via Terminal, this can be done with only one line of code.
Let’s say your username is “email@example.com”, and your password is “password” and you want to say something clever like “Look at me tweeting from my terminal!”, the following code would send a tweet to Twitter:
curl -u firstname.lastname@example.org:password -d status="Look at me tweeting from my terminal!" http://twitter.com/statuses/update.xml
Thanks to the great guide at mac-terminal.com for this info!