Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Facebook Open Graph API

13,526 views

Published on

Facebook Open Graph API presentation from Facebook Developers Garage Toronto on Oct 21, 2010

Published in: Technology
  • Be the first to comment

Facebook Open Graph API

  1. 1. Open Graph API
  2. 2. Social Plugins
  3. 3. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <title>The Rock (1996)</title> <meta property="og:title" content="The Rock"/> <meta property="og:type" content="movie"/> <meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/> <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/> <meta property="og:site_name" content="IMDb"/> <meta property="fb:admins" content="USER_ID"/> <meta property="og:description" content="A group of U.S. Marines, under command of a renegade general, take over Alcatraz and threaten San Francisco Bay with biological weapons."/> ... </head> ... </html> Like Button
  4. 4. Admin Page
  5. 5. Data Objects as URLs Users: https://graph.facebook.com/btaylor (Bret Taylor) Pages: https://graph.facebook.com/cocacola (Coca-Cola page) Events: https://graph.facebook.com/251906384206 (Facebook Developer Garage Austin) Groups: https://graph.facebook.com/2204501798 (Emacs users group) Applications: https://graph.facebook.com/2439131959 (the Graffiti app) Status messages: https://graph.facebook.com/367501354973 (A status message from Bret) Photos: https://graph.facebook.com/98423808305 (A photo from the Coca-Cola page) Photo albums: https://graph.facebook.com/99394368305 (Coca-Cola's wall photos) Profile pictures: http://graph.facebook.com/csmillie/picture (your profile picture) Videos: https://graph.facebook.com/614004947048 (A Facebook tech talk on Tornado) Notes: https://graph.facebook.com/122788341354 (Note announcing Facebook for iPhone 3.0) Check-ins: https://graph.facebook.com/414866888308 (Check-in at a pizzeria)
  6. 6. /me/ Short Cut Friends: https://graph.facebook.com/me/friends News feed: https://graph.facebook.com/me/home Profile feed (Wall): https://graph.facebook.com/me/feed Likes: https://graph.facebook.com/me/likes Movies: https://graph.facebook.com/me/movies Books: https://graph.facebook.com/me/books Notes: https://graph.facebook.com/me/notes Photo Tags: https://graph.facebook.com/me/photos Photo Albums: https://graph.facebook.com/me/albums Video Tags: https://graph.facebook.com/me/videos Video Uploads: https://graph.facebook.com/me/videos/uploaded Events: https://graph.facebook.com/me/events Groups: https://graph.facebook.com/me/groups Check-ins: https://graph.facebook.com/me/checkins
  7. 7. JSON Encoded Data{ "data": [ { "id": "555020699_160639637289676", "from": { "name": "Colin Smillie", "id": "555020699" }, "message": "I agree with Reg, this makes me really proud to live in Toronto...", "picture": "http://external.ak.fbcdn.net/safe_image.php? d=ace00444e7daf6cb40d8605fae85c257&w=130&h=130&url=http%3A%2F%2Fi.ytimg.com%2Fvi%2F-KGLgDQAo5U %2F0.jpg", "link": "http://www.youtube.com/watch?v=-KGLgDQAo5U&feature=youtube_gdata_player", "source": "http://www.youtube.com/v/-KGLgDQAo5U&autoplay=1", "name": "Hoedown Throwdown", "caption": "www.youtube.com", "description": "I got off the subway at Bloor and Yonge last night, and this is what I saw; some buskers with a fiddle and a banjo were playing, and these four other guys just started to pop it and lock it, apparently just for the hell of it. It cheered me right up.", "icon": "http://static.ak.fbcdn.net/rsrc.php/zj/r/v2OnaTyTQZE.gif", "actions": [ { "name": "Comment", "link": "http://www.facebook.com/555020699/posts/160639637289676" }, { "name": "Like", "link": "http://www.facebook.com/555020699/posts/160639637289676" } ],
  8. 8. OAUTH v2 https://graph.facebook.com/csmillie?access_token=... curl -F grant_type=client_credentials -F client_id=your_app_id -F client_secret=your_app_secret https://graph.facebook.com/oauth/access_token
  9. 9. Old REST API https://api.facebook.com/method/method_name? access_token=oauth_access_token& arg0=value0& arg1=value1 https://api.facebook.com/method/users.getInfo? uids=555020699&fields=name&access_token=…

×