dir.create( "photos" ) photos <- facebook( "me/photos" ) sapply( photos$data, function(x){ url <- x$source download.file( url, file.path( "photos", basename(url) ) ) })