Skip to content

Instantly share code, notes, and snippets.

@maxweber
Created February 26, 2011 14:47
Show Gist options
  • Save maxweber/845261 to your computer and use it in GitHub Desktop.
Save maxweber/845261 to your computer and use it in GitHub Desktop.
Fetching something from the Facebook Graph API with clj-http
user> (require '[clj-http.client :as client])
nil
user> (use 'clojure.pprint)
nil
user> (pprint (client/get "https://graph.facebook.com/220439"))
{:status 200,
:headers
{"p3p"
"CP=\"Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p\"",
"content-type" "text/javascript; charset=UTF-8",
"date" "Sat, 26 Feb 2011 14:39:25 GMT",
"set-cookie"
"datr=nRBpTeUClOX642dyOoZyp1-_; expires=Mon, 25-Feb-2013 14:39:25 GMT; path=/; domain=.facebook.com; httponly",
"cache-control" "private, no-cache, no-store, must-revalidate",
"expires" "Sat, 01 Jan 2000 00:00:00 GMT",
"etag" "\"6d6f7b5c441c1d74c9e3550fb32d8b567569a18a\"",
"x-powered-by" "HPHP",
"content-length" "154",
"pragma" "no-cache",
"connection" "close",
"x-fb-server" "10.42.67.21"},
:body
"{\"id\":\"220439\",\"name\":\"Bret Taylor\",\"first_name\":\"Bret\",\"last_name\":\"Taylor\",\"link\":\"http:\\/\\/www.facebook.com\\/btaylor\",\"gender\":\"male\",\"locale\":\"en_US\"}"}
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment