Skip to content

Instantly share code, notes, and snippets.

@rfaisal
Created March 19, 2014 02:34
Show Gist options
  • Select an option

  • Save rfaisal/9634501 to your computer and use it in GitHub Desktop.

Select an option

Save rfaisal/9634501 to your computer and use it in GitHub Desktop.
var https=require('https');
var querystring=require('querystring');
var _my_lat=37.78583526611328;
var _my_lng=122.40641784667969;
var _my_fb_access_token ='somebigvaluefromfacebook';
var params = {
type: 'place',
center: _my_lat+','+_my_lng,
access_token: _my_fb_access_token
};
var url = 'https://graph.facebook.com/search?'+querystring.stringify(params);
https.get(url, function(res) {
var msg = '';
res.on('data', function(chunk) {
msg+=chunk;
});
res.on('end', function() {
var v = JSON.parse(msg);
//print v
});
}).on('error', function(e) {
//print e
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment