arch bash cakephp conf dauth devops drupal foss git golang information age life linux lua mail monitoring music mysql n900 netlog openstack perf photos php productivity python thesis travel uzbl vimeo web2.0

A script that pulls photos from facebook

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)
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.

$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.



How do i run this script in windows , I made a php file with this code but it does not run in php.


my code is in bash. it needs a bash shell. fbcmd is php though.





What is the first name of the guy blogging here?

This comment form is pretty crude. Make sure mandatory fields are entered correctly.
Basic html tags (a,i,b, etc) are allowed, others are sanitized