Twitter service is working by http protocol, so easy to post messages there via `curl'. Let's write some small BASH script:
#!/bin/bash
#
curl --basic --user USERNAME:PASSWORD --data status="$*" \
'http://twitter.com/statuses/update.xml' -o /dev/null
#
curl --basic --user USERNAME:PASSWORD --data status="$*" \
'http://twitter.com/statuses/update.xml' -o /dev/null
Let's call it `tw', make it executable and run as:
tw "My test messages to twitter"
Check result on http://twitter.com/yourpage
Cheers
UPDATE: HERE the detailed article
UPDATE2: The above method was ceased to work after August 16th, 2010 when Twitter removes basic authentication support from the API. Instead, all Twitter clients will need to use more secure authentication based on OAuth. The great article about how to do it in python is HERE. Thanks to @Jeff Miller for great explanation.
No comments:
Post a Comment