Fbcmd is pretty cool.
I quickly hacked this script together which pulls all photo albums from friends on facebook, so I have them available where I want. (It should also pull your own albums, but I don't have any so I can't check that)
::Read from here
Maybe there are better ways to do this. I looked at fbfs but it looks a bit weird. I have no idea what the corrupted images fuss is all about.
#!/bin/bash
dir=$HOME/fbphotos
cache=${XDG_CACHE_HOME:-$HOME/.cache}
[ -d $cache ] || mkdir $cache
[ -d $cache ] || exit 2
#fbcmd=`which fbcmd`
fbcmd='php /home/dieter/fbcmd/fbcmd.php'
echo "Fetching info about friends and myself .."
$fbcmd FRIENDS -csv | tail -n '+2' > $cache/fb-users # ID NAME
$fbcmd WHOAMI -csv >> $cache/fb-users
while read line
do
uid=` cut -d ',' -f 1 <<< "$line"`
uname=`cut -d ',' -f 2 <<< "$line"`
echo "Fetching list of albums for user $uname ... "
$fbcmd ALBUMS $uid -csv | tail -n '+2' > $cache/fb-$uid-albums #OWNER_NAME AID NAME SIZE
done < $cache/fb-users
for i in $cache/fb-*-albums
do
while read line
do
oname=`cut -d ',' -f 1 <<< "$line"`
aid=` cut -d ',' -f 2 <<< "$line"`
aname=`cut -d ',' -f 3 <<< "$line"`
asize=`cut -d ',' -f 4 <<< "$line"`
echo "Fetching $oname album: $aname"
$fbcmd APICS $aid $dir -psize=1 -af="$oname-$aname/[pid].jpg" -pic_skip_exists=1
done < $i
done
Here's a picture from Counting cows I grabbed from Lievens album.

posted on Tuesday, 18 Aug 2009 17:36 - link - tags: bash - path: / - 2 comments
Posted by varad on Thu Dec 31 00:16:04 2009
my code is in bash. it needs a bash shell. fbcmd is php though.
Posted by Dieter_be on Thu Dec 31 11:13:22 2009
Dieter,
How do i run this script in windows , I made a php file with this code but it does not run in php.
Varada