SlideShare a Scribd company logo
Facebook development platform
For .net Developers
Photographing

           Music

           Startups

           Entrepreneurship   www.lidans.com




About me   Interests          Contact
Agenda
    Introduction to facebook platform
    Facebook architecture, Platform components


    Enhancing facebook pages with FBML
    Using Static FBML Application


    Facebook for Websites
    Open Graph Protocol, Social Plugins


    Facebook apps development
    With ASP.NET MVC & Social Graph API
Part 1
Introduction to
facebook platform
20 Minutes on facebook...
                                    FRIEND
  LINKS             EVENT                               PHOTOS       MESSAGES
 SHARED                            REQUESTS
                   INVITES                             UPLOADED        SENT
                                   ACCEPTED



1,000,000      1,484,000           1,972,000           2,716,000    2,716,000



          TAGGED              STATUS           WALL           COMMENTS
          PHOTOS             UPDATES           POSTS            MADE




       1,323,000         1,851,000        1,587,000          10,208,000
20 Minutes on facebook...



        500 GB
         of data every 20 minutes!

               ~36 TB/day
               ~13 PB/year
How to handle such a freak
amount of information?
open source
facebook infrastructure
facebook infrastructure



More information at:

http://developers.facebook.com/opensource
facebook platform- why?
More than
            of facebook users engaged

70%         with facebook applications
            every day

More than   facebook users engaged with

250M        facebook on 2.5M websites every
            month
More than   facebook users accessing

200M        facebook through their mobile
            devices every day
Platform Core Components

  Social Graph API     Facebook Insights




 Social Plugins      Open Graph Protocol
Part 2
Enhancing facebook pages
with FBML
Static FBML Application

   Provides HTML, CSS and
  JavaScript functionality on
       facebook pages
What’s needed?

   Be admin of your facebook page

   Install Static FBML Application

   Add FBML Tabs with static content
Before getting started...


facebook pages      Max width is
     only             520px


                     You cannot
                 auto run JavaScript
                    in FBML tab
                                       Use external CSS
6 Tabs maximum                          file instead of
                      Use FBJS
                                          <style> tag
Demo
Adding FBML Tab to
facebook page
FBML
FBML

>fb:user-agent includes="ie 6, ie 7”>
     <link rel="stylesheet” href="ie.css” />
</fb:user-agent>


>fb:swf   imgstyle="border-width: 3px; border-color: white;”
          swfsrc="http://www.youtube.com/v/CfMGFHiTKLY”
          imgsrc="http://i4.ytimg.com/vi/CfMGFHiTKLY/default.jpg”
          width="480”
          height="390” />
FBML
>fb:swf  imgstyle="border-width: 3px; border-color: white;”
>fb:user-agent includes="ie 6, ie 7”>
         swfsrc="http://www.youtube.com/v/CfMGFHiTKLY”
      <link rel="stylesheet” href="ie.css” />
         imgsrc="http://i4.ytimg.com/vi/CfMGFHiTKLY/default.jpg”
FBML Documentation is available at:
         width="480”
</fb:user-agent>
         height="390” />
http://developers.facebook.com/docs/reference/fbml


Remember that FBML is deprecated
Part 3
Facebook for Websites
Platform Core Components




              Open Graph Protocol
A Webpage...
Is a real-world facebook object!


                                 Lidan



   Like     Comment   Check-in    Picture
Recommend
What do you LIKE in the
real-world?
(Except your smartphone)
Movies
Food
Government
Bar

Government
Public Figure
Actor
What user likes in the real-world
Based off of the most popular categories for Facebook Pages


Activities
Businesses                               company, restaurant
Groups                                   sports_team, cause
Organizations                            band, government
People                                   musician, actor
Places                                   city, country
Products and Entertainment               book, movie, tv_show
Websites                                 website, blog, article
Implementing the Open Graph
Implementing the Open Graph
>html xmlns="http://www.w3.org/1999/xhtml”>
      xmlns="http://www.w3.org/1999/xhtml”
  <head>
       xmlns:og=“http://ogp.me/ns#”
    <title> The Social Network (2010) </title>
       xmlns:fb="http://www.facebook.com/2008/fbml”>
  </head>
  <head>
    <title> The Social Network (2010) </title>
  </head> property="og:title” content="The Social Network” />
    <meta
    <meta property="og:type” content="Movie” />
    <meta property="og:url” content="http://www.imdb.com/897” />
    <meta property="og:image”
     content="http://www.imdb.com/897/theSocialNetwork.jpg” />
</head>
Open Graph Meta-Tags


fb:admins           og:street-address
               og:latitude og:longitude




og:audio              og:email
og:video          og:phone_number
Open Graph Meta-Tags


More information at:
     fb:admins              og:street-address
                       og:latitude og:longitude
http://ogp.me

      og:audio                og:email
      og:video            og:phone_number
Platform Core Components




        Social Plugins
Social Plugins
               Provides integration between
               facebook platform and your
               website



Let user see what his friends have
liked, commented on or shared
across the web
Facebook Platform for Developers
Social Plugins
   Like Button       Login


   Activity Feed     Facepile


   Recommendations   Comments


   Like Box          Live Stream
Like Box

    Enable users to like your
  facebook page and view its
   stream directly from your
            website
Like Box
IFrame
<iframe
src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2
Fwww.facebook.com%2Fplatform&amp;width=292&amp;colorscheme=light&a
mp;show_faces=true&amp;stream=true&amp;header=true&amp;height=427"
scrolling="no"
frameborder="0"
style="border:none; overflow:hidden; width:292px;height:427px;"
allowTransparency="true"></iframe>



XFBML
<script
src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>

<fb:like-box href="http://www.facebook.com/platform" width="292"
show_faces="true" stream="true" header="true"></fb:like-box>
Demo
Generate code for all of the social plugins at:
   Like Box
http://developers.facebook.com/docs/plugins
Like Button


  Lets users share pages from
your site back to their facebook
     profile with one click
Demo
Like Button
Recommendations

  Gives users personalized
suggestions for pages on your
     site they might like
Advanced plugins
Setup a new application at:
   Create a new facebook
http://developers.facebook.com/setup
   application
Comments

 Lets users comment on any
 piece of content on your site
Demo
Comments
Live Stream

 Lets users share activity and
comments in real time, best for
       real-time events
Demo
Live Stream
Login & Registration

 Allows users to easily sign up
  for your website with their
       facebook account
Facebook Platform for Developers
More information at:

http://developers.facebook.com/docs/plugins/registration
A Short Break
Good time to update your status
Part 4
facebook apps development
TOP Facebook apps (January 2011)

98,607,517
53,508,022
37,187,222

346,300
What motivates users to use
facebook apps?
too much free time
What makes facebook apps so successful?



   Social                 Competitiveness



               Simple

  Viral                       Real time
                              Anytime
Platform Core Components


         Social Graph API
The Social Graph
“Privacy no longer a social norm”
                             - Mark Zuckerberg
Facebook Platform for Developers
The Social Graph
https://graph.facebook.com/ me/ albums/



                                                            comment

                                       Profile Pictures
                     notes

 My Pictures
                             Picture       Picture        Picture
                   comment
Objects
Unique ID       https://graph.facebook.com/ lidan
                                            698752998
{
     id: "698752998“,
     name: "Lidan Hifi“,
     first_name: "Lidan“,
     last_name: "Hifi“,
     link: "http://www.facebook.com/lidan",
     birthday: "04/27/1988“,
     location: {
            id: "113187025363265“,
            name: "Be'Er Sheva`, Hadarom, Israel"
     },
     gender: "male“
}
Relationships
               https://graph.facebook.com/ 698752998 /feed
{id: "698752998_187701601241105“,
from: {
       name: "Lidan Hifi“,
       id: "698752998"
}
message: " ‫רק הטלפון שלי עם התיקון שגיאות שלו יכול לאחל לאנשים שנה מלאה‬
"...‫-,בלוויות במקום שנה מלאה בחוויות‬
privacy: {
       description: "Friends Only; “,
       value: "CUSTOM“,
       friends: "ALL_FRIENDS"
},
type: "status“,
created_time: "2011-01-02T13:05:10+0000“,
likes: 5
}
Relationships
          https://graph.facebook.com/lidan/friends
          https://graph.facebook.com/lidan/photos
          https://graph.facebook.com/lidan/videos
          https://graph.facebook.com/lidan/likes
          https://graph.facebook.com/lidan/notes
          https://graph.facebook.com/lidan/links
          https://graph.facebook.com/lidan/events
          https://graph.facebook.com/lidan/groups
Authentication
OAuth 2.0-based authentication
        https://graph.facebook.com/me?access_token=2227470867|2.v
        UgGGAgEL6yF_LEYygniXA__.3600.1296417600698752998|rlW
        FrcgmkEVVKd7aYi3bKjNZ1gU



Permissions
You must request specific permissions from the user
read_stream, publish_stream, user_photos,
user_checkins, user_location, offline_access
Authentication
OAuth 2.0-based authentication
        https://www.facebook.com/dialog/oauth?client_id=114587458
        https://www.facebook.com/dialog/oauth?client_id=114587458
        https://graph.facebook.com/me?access_token=2227470867|2.v
        &redirect_uri=http://www.lidans.com
        UgGGAgEL6yF_LEYygniXA__.3600.1296417600698752998|rlW
        &redirect_uri=http://www.lidans.com
        FrcgmkEVVKd7aYi3bKjNZ1gU



Permissions
You must request specific permissions from the user
read_stream, publish_stream, user_photos,
user_checkins, user_location, offline_access
Publishing
HTTP POST https://graph.facebook.com/18754916/attending

HTTP POST https://graph.facebook.com/lidan/feed
          { message: ‘Hi, Do you like the graph API?’ }

HTTP POST https://graph.facebook.com/lidan/checkins
          { coordinates: { 32.175876, 34.889177 },
            place: 149111711803941,
            message: ‘playing with the graph API
                        at Microsoft Israel’
          }
Deleting
HTTP DELETE https://graph.facebook.com/5174466698
Deleting
     HTTP DELETE https://graph.facebook.com/5174466698


More info about Facebook Social Graph:


http://graph.facebook.com
How facebook app works
                      5 Response
                     For application   6 HTML
                                       Response      user
Application server   3 API Call
                4 API                             1 User
               Response                           Request
     2   Request
    For application
What’s needed?




Web Server           Facebook    Application
Valid domain or IP
  (NO localhost)
                       SDK       Application Id
                                 API Key
                                 AppSecret
Facebook applications
Setup a new application at:
   Setup a new facebook
http://www.facebook.com/developers
   application
Application Settings



           APP_NAME
Application Pages
facebook Official SDKs



             FBJS
facebook C#.NET SDKs

     Facesharp
     http://facesharp.codeplex.com



     Facebook C# SDK
     http://facebooksdk.codeplex.com
Demo
Create facebook application
with ASP.NET MVC
Review
   Facebook platform

   Facebook pages & Static FBML

   Facebook for Websites

   Facebook Applications
More Topics
Advanced APIs

Performance

Facebook Credits

Promote your application
Related links
Thanks! Questions?

More Related Content

PDF
Facebook Open Graph API and How To Use It
PPTX
Facebook Open Graph Protocol and Graph API (NoVA Code Camp 2010.1)
PDF
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
PPT
Facebook open graph explained
KEY
Facebook Open Graph Overview
PDF
Facebook Open Graph Tech Requirements
PDF
Social media fundraising
PPTX
Off page seo
Facebook Open Graph API and How To Use It
Facebook Open Graph Protocol and Graph API (NoVA Code Camp 2010.1)
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
Facebook open graph explained
Facebook Open Graph Overview
Facebook Open Graph Tech Requirements
Social media fundraising
Off page seo

What's hot (18)

PDF
Why you need to be on Google+
PPTX
Social Media Automation
ODP
Jetpack 2.0
PDF
Tracking online conversations with Yahoo Pipes
DOC
A Guide Social Media Platforms
PPT
Blog and search
PPTX
Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015
PDF
Open Hack Day Bangalore: Hacking Yahoo! Social
PDF
Introduction to Facebook Javascript SDK (NEW)
PPTX
SearchLove Boston 2013_Will Critchlow_Technical SEO
PPTX
Design Portfolio
PPTX
Google+
PPTX
Understanding Facebook's Open Graph
PPTX
Social media consultants roadmap for 2012
PPTX
Twitter Basics for Business
PPT
Andrea borden powerpoint project
PPTX
How to get volunteers to like you2
PPT
Introduction to Social Networking Sites and websites
Why you need to be on Google+
Social Media Automation
Jetpack 2.0
Tracking online conversations with Yahoo Pipes
A Guide Social Media Platforms
Blog and search
Why Deep Linking is the Next Big Thing: App Indexing - SMX East 2015
Open Hack Day Bangalore: Hacking Yahoo! Social
Introduction to Facebook Javascript SDK (NEW)
SearchLove Boston 2013_Will Critchlow_Technical SEO
Design Portfolio
Google+
Understanding Facebook's Open Graph
Social media consultants roadmap for 2012
Twitter Basics for Business
Andrea borden powerpoint project
How to get volunteers to like you2
Introduction to Social Networking Sites and websites
Ad

Viewers also liked (7)

PPTX
Getting started with Facebook OpenGraph API
PPT
Facebook Open Graph API
PDF
Open tok Android sdk - Droidcon
PDF
Cidades Inteligentes: Interdisciplinaridade, Software Livre, Dados Abertos e ...
PDF
Understanding the potential of the Facebook Open Graph and Graph API
PPTX
LinkedIn API Possibilities
PDF
Geração de Inovação para Cidades Inteligentes
Getting started with Facebook OpenGraph API
Facebook Open Graph API
Open tok Android sdk - Droidcon
Cidades Inteligentes: Interdisciplinaridade, Software Livre, Dados Abertos e ...
Understanding the potential of the Facebook Open Graph and Graph API
LinkedIn API Possibilities
Geração de Inovação para Cidades Inteligentes
Ad

Similar to Facebook Platform for Developers (20)

PPT
Facebook Coin
PPT
Facebook Coin
PPT
Facebook Coin
PPT
Facebook_Coin
PPT
Facebook plateform architecture presentation
PDF
Build social apps for Facebook
PDF
Facebook Inside Out
PPT
Facebook Timeline for Business
PPTX
Introduction to facebook sdk
PDF
Facebook Dorkbot
PPTX
Introduction to facebook platform
ODP
Facebookjoomla final
PDF
Facebook for charities
PPTX
Optimizing WordPress sites for SEO and social media by Miriam Schwab
PPT
Facebook Coin
KEY
페이스북 소셜 앱 개발 가이드 2011
KEY
How to Leverage the Social Graph with Facebook Platform
PDF
Facebook Connect in 3 Hours
PPT
Facebook
PDF
Facebook Updates
Facebook Coin
Facebook Coin
Facebook Coin
Facebook_Coin
Facebook plateform architecture presentation
Build social apps for Facebook
Facebook Inside Out
Facebook Timeline for Business
Introduction to facebook sdk
Facebook Dorkbot
Introduction to facebook platform
Facebookjoomla final
Facebook for charities
Optimizing WordPress sites for SEO and social media by Miriam Schwab
Facebook Coin
페이스북 소셜 앱 개발 가이드 2011
How to Leverage the Social Graph with Facebook Platform
Facebook Connect in 3 Hours
Facebook
Facebook Updates

Facebook Platform for Developers