Kwissle

My real-time quiz battle game Kwissle.com

Crosstips.org

My fun Crossword solver project. Crosstips.org & Krysstips.se

Kung Fu

Fujian White Crane Kung Fu

Photos

Photoalbum, both old and new.

Twitter

Follow me on Twitter

Contact me

My contact details and how to contact me.

 

KungFuPeople.com
Do you train Kung Fu?
Or know someone who does?
Then check out KungFuPeople.com


Mobile version of this page Mobile version of this page


 
Linux

FacebookStatusUpdater


7th of June 2007

FacebookStatusUpdater This is silly but fun. I can with one command on the command line start updating my Facebook profile. It's not using the Facebook Developer API but a PHP script I copied from some other blog I can't find right now. Here's how I use it:

 peterbe@trillian:~ $ FacebookStatusUpdater 
 Peter is happily blogged about his latest facebook status updater
 Updating Facebook...

It's an interactive prompt and starts with "Peter is " and then I write till I hit the Return and it gets uploaded and saved. See attached screenshot.

The bash script is clever in that it either takes parameters or it shows the interactive prompt. If I write this:

 peterbe@trillian:~ $ FacebookStatusUpdater blogged about something

...it won't run the prompt. Here's the bash code I used:

 #!/bin/bash
 if [ "$#" == 0 ]; then
   read -p "Peter is " myline
 else
   myline=$@
 fi
 echo "Updating Facebook..."
 php5 -f /home/peterbe/Programs/UpdateFacebookStatus.php $myline



Comment

 
Name:
Email:
hide my email address.

Your email address will be encoded to prevent email-extraction spiders from reading it so you won't get spammed if you decide to show your email address.