Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get username from http://graph.facebook.com/<id>
;; Playing with racket
(require net/url)
(require json)
(require rnrs/io/ports-6)
(define link "http://graph.facebook.com/")
(define (get-username id)
(let ((ht (call-with-port (get-pure-port (string->url (string-append link id)))
(lambda (p)
(read-json p)))))
(hash-ref ht 'username)))
(get-username "4")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment