Previously I posted on how to update twitter from the command line. Now I am going to build upon that and show you how to do it with twitter and facebook. To make it easier we are going to make a shell script.

#!/bin/sh

user="Your twitter username"
pass="Your twitter password"
curl="/usr/bin/curl"

$curl --basic --user "$user:$pass" --data-ascii \
"status=`echo $@ | tr ' ' '+'`" \
"http://twitter.com/statuses/update.xml"

exit 0

You can copy/paste the code directly into a shell script, just replace the user and pass with your twitter user name and password. I called my shell script twit.sh. That will let you update twitter by typing ./twit.sh your twitter message. Remember to keep your message under 140 characters (the maximum message length twitter will allow).

Now we are going to setup facebook to accept twitter messages as profile updates (this is the easy part). Go here and get the app. It is a facebook app so their is nothing to download, it will just add the app to your facebook profile. It will ask you for your twitter user name and password. After that you select the option that says user twitter to update facebook status. Now just type ./twit.sh your message and you are ready to update twitter and facebook.

About The Author