SlideShare a Scribd company logo
DevCon 2010
Hyderabad │ 24th
October
Facebook apps development for web devs
Krishna Chaitanya T │ Future Web Research Lab, SETLabs, Infosys
 Overview of Facebook platform & the social web
 The Facebook Graph API
 Getting started with Facebook apps
 How Facebook Authentication works (C# demo)
 JavaScript SDK & Social plugins
S E S S I O N A G E N D A
DevCon 2010
Hyderabad │ 24th
October
Facebook.comDevCon 2010
Hyderabad │ 24th
October
 More than 500 million active users, 150 million mobile users
 Over 900 million objects that people interact with (pages, groups, events)
 More than 1 million developers & 555,000 apps … More
 Social Graph – A graph that connects people & things they care about
 FB Platform – Set of APIs & tools to integrate with social graph. Available for
websites, apps on Facebook, mobile apps
 Personalized experiences. Ex: Docs.com
OVERVIEWDevCon 2010
Hyderabad │ 24th
October
 Provides consistent view of FB social graph
 Every object in the social graph has unique ID
 Query: https://graph.facebook.com/[ID or UserName]
 All objects are accessible similarly & all responses are JSON objects
 Object for MUGH group: http://graph.facebook.com/themugh
 Picture of Bill Gates: http://graph.facebook.com/billgates/picture
 Connections: Relationships b/w objects(requires authentication)
 Query: https://graph.facebook.com/ID/CONNECTION_TYPE
 Friends: https://graph.facebook.com/me/friends?limit=15
 Books: https://graph.facebook.com/me/books
 People attending DevCon: https://graph.facebook.com/152359924805795/attending
Facebook Graph APIDevCon 2010
Hyderabad │ 24th
October
 Register your facebook app
 Specify canvas page & canvas URL (can use http://localhost during dev)
 The App Id is “client_Id” & App Secret is “client_secret”. We’ll use this later.

 Choose “Canvas Type” as “Iframe” or “FBML” and save changes.
 Host your app at canvas URL and test. (The demos here use “Iframe”)
Getting started with FB appsDevCon 2010
Hyderabad │ 24th
October
 FB uses oAuth 2.0 protocol for authentication.
 Authorized requests to Facebook require access token . Here are the steps to make
authorized requests:
1. Redirect to
https://graph.facebook.com/oauth/authorize? client_id=...&
redirect_uri=http://www.example.com/oauth_redirect
2. User authorizes-> FB redirects to “redirect_uri” with the parameter “code”
3. Extract the “code” & redirect to:
https://graph.facebook.com/oauth/access_token? client_id=...&
redirect_uri=http://www.example.com/oauth_redirect& client_secret=...& code=...
4. From the above request, Facebook returns “access_token”. Use this to make
authorized requests like :
https://graph.facebook.com/me?access_token=...
Facebook AuthenticationDevCon 2010
Hyderabad │ 24th
October
DEMO: Making Facebook oAuth handshake using C#
DevCon 2010
Hyderabad │ 24th
October
 Simplifies authentication process without worrying about oAuth handshake.
Enables all features of Graph API via JavaScript
 The SDK is open source and is available on GitHub.
 API is initialized like this:
FB.init({appId: 'your app id', status: true, cookie: true, xfbml: true});
 Subscribe to events, trigger UI interactions, make calls to Graph API.
 Social plugins: Embeddable social features to integrate into your site, single line of
code.
 Extensions of facebook, ensure data is not shared hosted sites
 Login button, Like box, Like button, Comments, Activity feed, Recommendations,
Live stream & FacePile.
JavaScript SDK & social pluginsDevCon 2010
Hyderabad │ 24th
October
DEMO: Creating Facebook app with JavaScript SDK & jQuery
DevCon 2010
Hyderabad │ 24th
October
 Facebook Docs
 http://developers.facebook.com/docs/
 Facebook C# SDK
 http://github.com/facebook/csharp-sdk
 Facebook JavaScript SDK
 http://developers.facebook.com/docs/reference/javascript/
RESOURCES
DevCon 2010
Hyderabad │ 24th
October
Twitter: @novogeek │ Blog: www.novogeek.com
DevCon 2010
Hyderabad │ 24th
October
Demo Facebook app: http://apps.facebook.com/devcon-app

More Related Content

PPT
Linkedin & OAuth
PPT
What's New on the Facebook Platform, August 2010
PDF
OAuth2 and LinkedIn
PPTX
Virtual TechDays 2011 - Hack your way with IE9 F12 Developer tools
PPTX
JSFoo Chennai 2012
PPTX
Secure web messaging in HTML5
PPS
Virtual Tech Days 2010 - Integrating Social Networks with ASP.NET
PPTX
Browser Internals-Same Origin Policy
Linkedin & OAuth
What's New on the Facebook Platform, August 2010
OAuth2 and LinkedIn
Virtual TechDays 2011 - Hack your way with IE9 F12 Developer tools
JSFoo Chennai 2012
Secure web messaging in HTML5
Virtual Tech Days 2010 - Integrating Social Networks with ASP.NET
Browser Internals-Same Origin Policy

Similar to DevCon 2010 - Facebook Apps development for ASP.NET devs (20)

PPT
Facebook api
PPT
Facebook API
PPT
What's New on the Facebook Platform, July 2011
PDF
Interactive with-facebook
PPTX
Introduction to facebook platform
PDF
Php day 2011 - Interactive-with-facebook
PPTX
Download PowerPoint Project on social programming for engineering students
ODP
Kt 15 07-2013
PPT
Facebook 3rd Party Api
PDF
Leveraging Rails to Build Facebook Apps
KEY
OAuth Introduction
PPT
Facebook plateform architecture presentation
ODP
Facebook Platform
PPT
Facebook Connect
PPT
Facebook apps
PPT
Facebook Apps
DOCX
Facebook SSO.docx
PPT
Introducing Facebook
PPT
Facebook Connect Integration
PDF
Facebook Connect Tutorial
Facebook api
Facebook API
What's New on the Facebook Platform, July 2011
Interactive with-facebook
Introduction to facebook platform
Php day 2011 - Interactive-with-facebook
Download PowerPoint Project on social programming for engineering students
Kt 15 07-2013
Facebook 3rd Party Api
Leveraging Rails to Build Facebook Apps
OAuth Introduction
Facebook plateform architecture presentation
Facebook Platform
Facebook Connect
Facebook apps
Facebook Apps
Facebook SSO.docx
Introducing Facebook
Facebook Connect Integration
Facebook Connect Tutorial
Ad

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
Understanding_Digital_Forensics_Presentation.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
The AUB Centre for AI in Media Proposal.docx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Ad

DevCon 2010 - Facebook Apps development for ASP.NET devs

  • 1. DevCon 2010 Hyderabad │ 24th October Facebook apps development for web devs Krishna Chaitanya T │ Future Web Research Lab, SETLabs, Infosys
  • 2.  Overview of Facebook platform & the social web  The Facebook Graph API  Getting started with Facebook apps  How Facebook Authentication works (C# demo)  JavaScript SDK & Social plugins S E S S I O N A G E N D A DevCon 2010 Hyderabad │ 24th October
  • 4.  More than 500 million active users, 150 million mobile users  Over 900 million objects that people interact with (pages, groups, events)  More than 1 million developers & 555,000 apps … More  Social Graph – A graph that connects people & things they care about  FB Platform – Set of APIs & tools to integrate with social graph. Available for websites, apps on Facebook, mobile apps  Personalized experiences. Ex: Docs.com OVERVIEWDevCon 2010 Hyderabad │ 24th October
  • 5.  Provides consistent view of FB social graph  Every object in the social graph has unique ID  Query: https://graph.facebook.com/[ID or UserName]  All objects are accessible similarly & all responses are JSON objects  Object for MUGH group: http://graph.facebook.com/themugh  Picture of Bill Gates: http://graph.facebook.com/billgates/picture  Connections: Relationships b/w objects(requires authentication)  Query: https://graph.facebook.com/ID/CONNECTION_TYPE  Friends: https://graph.facebook.com/me/friends?limit=15  Books: https://graph.facebook.com/me/books  People attending DevCon: https://graph.facebook.com/152359924805795/attending Facebook Graph APIDevCon 2010 Hyderabad │ 24th October
  • 6.  Register your facebook app  Specify canvas page & canvas URL (can use http://localhost during dev)  The App Id is “client_Id” & App Secret is “client_secret”. We’ll use this later.   Choose “Canvas Type” as “Iframe” or “FBML” and save changes.  Host your app at canvas URL and test. (The demos here use “Iframe”) Getting started with FB appsDevCon 2010 Hyderabad │ 24th October
  • 7.  FB uses oAuth 2.0 protocol for authentication.  Authorized requests to Facebook require access token . Here are the steps to make authorized requests: 1. Redirect to https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/oauth_redirect 2. User authorizes-> FB redirects to “redirect_uri” with the parameter “code” 3. Extract the “code” & redirect to: https://graph.facebook.com/oauth/access_token? client_id=...& redirect_uri=http://www.example.com/oauth_redirect& client_secret=...& code=... 4. From the above request, Facebook returns “access_token”. Use this to make authorized requests like : https://graph.facebook.com/me?access_token=... Facebook AuthenticationDevCon 2010 Hyderabad │ 24th October
  • 8. DEMO: Making Facebook oAuth handshake using C# DevCon 2010 Hyderabad │ 24th October
  • 9.  Simplifies authentication process without worrying about oAuth handshake. Enables all features of Graph API via JavaScript  The SDK is open source and is available on GitHub.  API is initialized like this: FB.init({appId: 'your app id', status: true, cookie: true, xfbml: true});  Subscribe to events, trigger UI interactions, make calls to Graph API.  Social plugins: Embeddable social features to integrate into your site, single line of code.  Extensions of facebook, ensure data is not shared hosted sites  Login button, Like box, Like button, Comments, Activity feed, Recommendations, Live stream & FacePile. JavaScript SDK & social pluginsDevCon 2010 Hyderabad │ 24th October
  • 10. DEMO: Creating Facebook app with JavaScript SDK & jQuery DevCon 2010 Hyderabad │ 24th October
  • 11.  Facebook Docs  http://developers.facebook.com/docs/  Facebook C# SDK  http://github.com/facebook/csharp-sdk  Facebook JavaScript SDK  http://developers.facebook.com/docs/reference/javascript/ RESOURCES DevCon 2010 Hyderabad │ 24th October
  • 12. Twitter: @novogeek │ Blog: www.novogeek.com DevCon 2010 Hyderabad │ 24th October Demo Facebook app: http://apps.facebook.com/devcon-app