#!/usr/bin/env node
var querystring = require('querystring');
var https = require('https');
var fs = require('fs');
var url = process.argv[2];
var post_data = querystring.stringify({
id : url,
scrape: true
});
var post_options = {
hostname: 'graph.facebook.com',
port: 443,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(post_data)
}
};
console.log("post " + url);
var req = https.request(post_options, function(response){
response.setEncoding('utf8');
response.on('data', function (chunk) {
console.log(chunk);
});
});
console.log("data sending");
req.write(post_data);
req.end();