get social with facebook
DESCRIPTION
Slides from my talk at the NDC 2012 on the Facebook Developer Plattform.TRANSCRIPT
![Page 1: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/1.jpg)
From Zero to Hero!
Sondre Bjellås www.sondreb.comDeepmind AS www.deepmind.no
«Get Social With Facebook»
![Page 2: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/2.jpg)
http://www.flickr.com/photos/bdewey/
![Page 3: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/3.jpg)
1. Why Social?
2. Facebook Developer Platform
3. Become The Hero!
![Page 4: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/4.jpg)
![Page 5: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/5.jpg)
1. Why Social?
![Page 6: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/6.jpg)
1 billion reasons!
• Facebook is estimated to reach 1 billion users in 2012.
• One of the biggest market opportunity in history of mankind.
• That is still just «only» 1 in every 7 human being on the planet...
![Page 7: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/7.jpg)
![Page 8: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/8.jpg)
What is WAS the Largest and Fastest Growing Social Game EVER?
![Page 9: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/9.jpg)
![Page 10: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/10.jpg)
Social Can Be Scary
• There are truly to much information available on everyone. It grows every day.
• Take responsibility, just because you can, doesn’t mean you should.
![Page 11: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/11.jpg)
www.touchgraph.com
![Page 12: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/12.jpg)
2. The Developer Platform
![Page 13: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/13.jpg)
Facebook Graph API
• The mapping of everybody and how they’re related.
• In Facebook context, it’s You and Your Users.
• API with JSON formatting for all the user’s information.
![Page 14: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/14.jpg)
Facebook Open Graph
![Page 15: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/15.jpg)
AGGREATIONS
ACTIONS
OBJECTS
![Page 16: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/16.jpg)
Facebook Credits
![Page 17: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/17.jpg)
![Page 18: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/18.jpg)
Why Do you Store Passwords?!
![Page 19: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/19.jpg)
Authentication
• Used to be hard, has become easy with OAuth 2.0. Does require HTTPS.
• One Token To Rule Them All!1. Get Token.2. Use Token.
• Valid from one hour and up to one day.
![Page 20: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/20.jpg)
developers.facebook.com
![Page 21: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/21.jpg)
My Site
My App
My App
![Page 22: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/22.jpg)
My Site
My App
My App
![Page 23: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/23.jpg)
It all starts with an app
First create your app on the developer portal: https://developers.facebook.com/apps
![Page 24: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/24.jpg)
3. Become The Hero
![Page 25: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/25.jpg)
3. Become The Hero
• Start from scratch, from zero.• Prototype your app.• Fresh it up with some style!
![Page 26: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/26.jpg)
Install-Package Facebook
![Page 27: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/27.jpg)
Facebook JavaScript SDK
// Load the SDK Asynchronously (function (d) { var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) { return; } js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; ref.parentNode.insertBefore(js, ref); } (document));
https://developers.facebook.com/docs/reference/javascript/
![Page 28: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/28.jpg)
Demo
![Page 29: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/29.jpg)
Considerations
• Which requests to handle on the client, directly to Facebook.
• Which requests to handle on the server, acting as a proxy towards Facebook.
![Page 30: Get Social With Facebook](https://reader033.vdocument.in/reader033/viewer/2022052620/557a854ad8b42ab7638b472b/html5/thumbnails/30.jpg)
Thanks!
Sondre BjellåsSenior Solutions ArchitectDeepmind AS
www.deepmind.nowww.sondreb.com