Skip to content

Instantly share code, notes, and snippets.

@infinito84
Created July 26, 2016 06:35
Show Gist options
  • Save infinito84/209d08d5198a608c21dd3bf86697049c to your computer and use it in GitHub Desktop.
Save infinito84/209d08d5198a608c21dd3bf86697049c to your computer and use it in GitHub Desktop.
Easy download of images from facebook, through a facebookid
var request = require('request');
var fs = require('fs')
var data = {
facebookid : '1627151517597811'
}
request('https://graph.facebook.com/'+ data.facebookid +'/picture?type=large')
.pipe(fs.createWriteStream('facebook_'+ data.facebookid +'.jpg'))
.on('close', function(){
console.log(data)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment