FacebookGonna say some techie stuff about APIs and that
Anatomy
1. Widgets
2. Pages
3. FB Connect
4. Applications
x. The Facebook vision
1. Widgets
● Very easy, very powerful, copy and paste
● The “like” button, Facepile, comments box, etc
● “Like” button + Open Graph = a Facebook Page!
● Advantages: viralness, Facebook brand
● Analytics facebook.com/insights
● 'Like' or 'recommend'
2. Pages
● For when you want to be on Facebook but not as a friendable
person
● Ready made hub, could even replace a website. Easy viralness and
kudos of FB brand.
● Default tabs: wall, info, photos, etc
● Can change 'home' tab
● Custom tabs: Big deal.
● FBML being deprecated for iFrames.
● Loads of applications can run in tabs
● Most notable are apps that integrate with the wall, eg; cross-posting
Twitter feeds, blog posts, Flickr photos etc
● NB. That Joe Public can make these Page-integrating apps
● You can get the 5000 most recent fan IDs of a social object
3. Facebook Connect
● Bonafide application territory; but, basic user-management is
enough of a feature in itself
● 'Basic information' = Full name, profile pic, gender, friends,
'everyone' data
● Permissions. Don't ask for too many.
● publish_stream, offline_access, email, read_stream (Activity Streams
standard), read_inbox, xmpp_login (XMPP is another open standard)
● photos, videos, etc and you can ask to access these for the app user's
friends!
● Can ask for permissions when user first connects to app or can 'extend'
at any point afterward too.
● Internal Vs. External
● Extra JS SDK methods for iFrames; dynamic resizing of iFrame
and messing with the URL
● Mafia Wars, Farmville. Don't know anything about them because
I blocked them from my stream :(
● Graph API
● Replaces old API. The new 'open' vision, more structured,
everything is a social object.
● True RESTful API interface
– Means lots of SDKs; PHP, Ruby, Python
– https://graph.facebook.com/me/friends?access_token=[foo]
– http://graph.facebook.com/tbuckleyhouston/picture
– JSON
4. Applications
● developers.facebook.com/setup
● Receive App ID and secret
● Lots of settings
● Icon, logo & FB Connect logo. Named developers. Email contact.
● All apps get their own bonafide FB Page
● Important links;
● developers.facebook.com/blog/feed
● developers.facebook.com/live_status
● facebook.com/insights
● Bug tracker
● Forums
● Documentation
STEP 1. Registering
Surprisingly easy :)
<div id="fb-root"></div>
<!--<script src="http://connect.facebook.net/en_US/all.js"></script>-->
<script src="http://static.ak.fbcdn.net/connect/en_US/core.debug.js"></script>
<script>
FB.init({
appId : 'YOUR APP ID', // [REQUIRED]
status : true, // check login status [OPTIONAL]
cookie : true, // allows server to access the session [OPTIONAL]
xfbml : true // parse XFBML [OPTIONAL]
});
</script>
STEP 2. Hello World
● Either XFBML or JS's FB.login()
● OAuth 2.0 (NB. Facebook is an OpenID relying party)
● Cookie is registered which can be used by server-side
SDKs.
● XFBML: X stands for XHTML, JS SDK parses it.
● Canvas legacy. Relatively useless. FBML only used by Page
Tabs now and not for much longer either.
– Simple <fb:name>
– Complex <fb:multi-friend-selector>, <fb:comments>
cannot be provided in any other way.
STEP 3. Add a login button
● JS SDK has 1 other class of methods unique to it; FB.ui
● Dialogs, exteneded permissions, posting to user's wall, sharing, etc.
● The API:
● JS has it (FB.api) just like all the others (PHP, Ruby, etc).
● You can read and write to and from user's (and Pages) accounts.
● Subscribe to individual real-time updates!
● Progromatically access analytics.
● You are rate limited, but it's a secret :s
● You are now allowed to cache data indefinitely (may be 1 or 2 exceptions)
● FQL:
● Very powerful, worthy of a page in itself. Sub queries, multiple queries per
API call.
● Read-only.
● AFAIK everything can be accessed through FQL!
STEP 4. Do stuff

Facebook

  • 1.
    FacebookGonna say sometechie stuff about APIs and that
  • 2.
    Anatomy 1. Widgets 2. Pages 3.FB Connect 4. Applications x. The Facebook vision
  • 3.
    1. Widgets ● Veryeasy, very powerful, copy and paste ● The “like” button, Facepile, comments box, etc ● “Like” button + Open Graph = a Facebook Page! ● Advantages: viralness, Facebook brand ● Analytics facebook.com/insights ● 'Like' or 'recommend'
  • 4.
    2. Pages ● Forwhen you want to be on Facebook but not as a friendable person ● Ready made hub, could even replace a website. Easy viralness and kudos of FB brand. ● Default tabs: wall, info, photos, etc ● Can change 'home' tab ● Custom tabs: Big deal. ● FBML being deprecated for iFrames. ● Loads of applications can run in tabs ● Most notable are apps that integrate with the wall, eg; cross-posting Twitter feeds, blog posts, Flickr photos etc ● NB. That Joe Public can make these Page-integrating apps ● You can get the 5000 most recent fan IDs of a social object
  • 5.
    3. Facebook Connect ●Bonafide application territory; but, basic user-management is enough of a feature in itself ● 'Basic information' = Full name, profile pic, gender, friends, 'everyone' data ● Permissions. Don't ask for too many. ● publish_stream, offline_access, email, read_stream (Activity Streams standard), read_inbox, xmpp_login (XMPP is another open standard) ● photos, videos, etc and you can ask to access these for the app user's friends! ● Can ask for permissions when user first connects to app or can 'extend' at any point afterward too.
  • 6.
    ● Internal Vs.External ● Extra JS SDK methods for iFrames; dynamic resizing of iFrame and messing with the URL ● Mafia Wars, Farmville. Don't know anything about them because I blocked them from my stream :( ● Graph API ● Replaces old API. The new 'open' vision, more structured, everything is a social object. ● True RESTful API interface – Means lots of SDKs; PHP, Ruby, Python – https://graph.facebook.com/me/friends?access_token=[foo] – http://graph.facebook.com/tbuckleyhouston/picture – JSON 4. Applications
  • 7.
    ● developers.facebook.com/setup ● ReceiveApp ID and secret ● Lots of settings ● Icon, logo & FB Connect logo. Named developers. Email contact. ● All apps get their own bonafide FB Page ● Important links; ● developers.facebook.com/blog/feed ● developers.facebook.com/live_status ● facebook.com/insights ● Bug tracker ● Forums ● Documentation STEP 1. Registering
  • 8.
    Surprisingly easy :) <divid="fb-root"></div> <!--<script src="http://connect.facebook.net/en_US/all.js"></script>--> <script src="http://static.ak.fbcdn.net/connect/en_US/core.debug.js"></script> <script> FB.init({ appId : 'YOUR APP ID', // [REQUIRED] status : true, // check login status [OPTIONAL] cookie : true, // allows server to access the session [OPTIONAL] xfbml : true // parse XFBML [OPTIONAL] }); </script> STEP 2. Hello World
  • 9.
    ● Either XFBMLor JS's FB.login() ● OAuth 2.0 (NB. Facebook is an OpenID relying party) ● Cookie is registered which can be used by server-side SDKs. ● XFBML: X stands for XHTML, JS SDK parses it. ● Canvas legacy. Relatively useless. FBML only used by Page Tabs now and not for much longer either. – Simple <fb:name> – Complex <fb:multi-friend-selector>, <fb:comments> cannot be provided in any other way. STEP 3. Add a login button
  • 10.
    ● JS SDKhas 1 other class of methods unique to it; FB.ui ● Dialogs, exteneded permissions, posting to user's wall, sharing, etc. ● The API: ● JS has it (FB.api) just like all the others (PHP, Ruby, etc). ● You can read and write to and from user's (and Pages) accounts. ● Subscribe to individual real-time updates! ● Progromatically access analytics. ● You are rate limited, but it's a secret :s ● You are now allowed to cache data indefinitely (may be 1 or 2 exceptions) ● FQL: ● Very powerful, worthy of a page in itself. Sub queries, multiple queries per API call. ● Read-only. ● AFAIK everything can be accessed through FQL! STEP 4. Do stuff