Skip to content

Instantly share code, notes, and snippets.

@nosamanuel
Created April 14, 2011 20:41
Show Gist options
  • Select an option

  • Save nosamanuel/920487 to your computer and use it in GitHub Desktop.

Select an option

Save nosamanuel/920487 to your computer and use it in GitHub Desktop.
var session = FB.getSession();
var query = FB.Data.query("select uid2 from friend where uid1 = {0}", session.uid);
var friend_ids = new Array();
FB.Data.waitOn([query], function() {
FB.Array.forEach(query.value, function(row) {
friend_ids.push(row.uid2);
});
console.log(friend_ids);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment