Created
September 25, 2010 19:57
-
-
Save abi/597220 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get access token from clicking one of the urls on | |
//http://developers.facebook.com/docs/api | |
//and copying the access_token GET param | |
var http = require('http'); | |
var fb = http.createClient(443, 'graph.facebook.com'); | |
try{ | |
fb.setSecure(); //SSL | |
var request = fb.request('GET', | |
'/btaylor?access_token=[INSERT ACCESS TOKEN HERE]', | |
{'host': 'graph.facebook.com'}); | |
request.end(); | |
request.on('response', function (response) { | |
console.log(response.statusCode); | |
var body = ""; | |
response.addListener('data', function(chunk) { | |
body += chunk; | |
}); | |
response.addListener('end', function() { | |
console.log(body); | |
}); | |
}); | |
}catch(e){ | |
console.log(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment