Skip to content

Instantly share code, notes, and snippets.

@zwilias
Created May 30, 2013 10:42
Show Gist options
  • Save zwilias/5677050 to your computer and use it in GitHub Desktop.
Save zwilias/5677050 to your computer and use it in GitHub Desktop.
function fbGraph(user, item, params) {
item = item || "";
user = user || "me";
var url = "https://graph.facebook.com/" + user + "/" + item + "?access_token=" + token;
if (params) {
for (key in params) {
url += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(params[key]);
}
}
var tmp = wget(url);
eval("tmp = " + tmp);
return tmp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment