FacebookStatusUpdater

07 June 2007   0 comments   Linux

Mind That Age!

This blog post is 10 years old! Most likely, its content is outdated. Especially if it's technical.

Powered by Fusion×

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

Comments

Thank you for posting a comment

Your email will never ever be published


Related posts

Previous:
<button> not supported on Pocket IE 02 June 2007
Next:
Optional input labels 13 June 2007
Related by Keyword:
Common names amongst my Facebook friends 26 June 2014
Integrate BrowserID in a Tornado web app 22 November 2011
TornadoGists.org - launched and ready! 06 April 2011
pwdf - a mix of ls and pwd 07 April 2008
The Official Dilbert Widget 31 January 2008
Related by Text:
type - Writing shell scripts 28 April 2006
set -ex - The most useful bash trick of the year 31 August 2014
Running simple SQL commands on the command line 08 January 2005
How I do deployments 16 December 2013
Mvbackupfiles - a script to "delete" back autosaved backup files 24 November 2005