Skip to content

Instantly share code, notes, and snippets.

Created December 5, 2012 02:39
Show Gist options
  • Save anonymous/4211625 to your computer and use it in GitHub Desktop.
Save anonymous/4211625 to your computer and use it in GitHub Desktop.
$ = jQuery
$.getJSON("http://localhost:5000?callback=?", function(v, k) {
list = _.pluck(v.data, 'NAME')
list2 = _.map(list, function(item) {
return item.trim();
})
})
FB.api("/me?fields=friends", function(me) {
filtered = _.filter(me.friends['data'], function(v, k) {
return _.contains(list2, v.name)
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment