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

Your email will never ever be published.

Previous:
<button> not supported on Pocket IE June 2, 2007 Web development
Next:
Optional input labels June 13, 2007 Web development
Related by category:
set -ex - The most useful bash trick of the year August 31, 2014 Linux
brotli_static in Nginx November 8, 2024 Linux
Be very careful with your add_header in Nginx! You might make your site insecure February 11, 2018 Linux
Linux tip: du --max-depth=1 September 27, 2007 Linux
Related by keyword:
Integrate BrowserID in a Tornado web app November 22, 2011 Tornado, Mozilla
Common names amongst my Facebook friends June 26, 2014 Wondering
TornadoGists.org - launched and ready! April 6, 2011 Python, Tornado
The Official Dilbert Widget January 31, 2008 Misc. links