Drupalcon SF - Facebook Applications, Powered by Drupal
#1 - Why should you care about Facebook? 400 Million users and growing... That pretty much says it all. I know lots of people who don’t spend every waking minute on facebook, but people are starting to use Facebook for lots of different things. Fred Vogelstein had a really interesting article on Wired magazine a while ago about people are starting to use facebook to find out where they should eat, go out, etc instead of using google. This could eventually lead to a huge shift in how the internet is currently being used.
The Facebook API and programming interface has matured a lot over the past few years and there are some really attractive features for developers. Currently the development platform supports Canvas pages & facebook connect. Both platforms could be used to develop mobile and desktop applications.
Canvas pages fall under the Facebook domain, but the whole content area (under the menu and to the left of the ads on the right side of the page). Canvas pages can have any number of pages and contain just about any content. The actual content is hosted on your own server. Canvas pages use a xml markup language called FBML, not HTML. Some example FBML tags are <fb: tabs> <fb:tab_item><fb:title>. As you can see, the markup is very similar to HTML. How do you create FBML pages from Drupal? Short answer, with the theming layer. Creating a custom theme that outputs FBML is very straight forward and allows you to keep the data layer separated from the presentation layer so you could potentially create a regular HTML theme as well and have the same data work in two different ways.
Facebook also provides another newer set of tools for building applications, Facebook Connect. Facebook connect brings social features to your website, “The other kind of Facbook apps”. Facebook connect is more popular with Drupal users.
The Drupal for Facebook module supports Facebook Connect. Here are a few details about Drupal and FB connect:
Single signed on for all Facebook Connect apps
Have to add xmlns:fb attribute tot he page.tpl
Canvas pages Vs. Facebook Connect Pages
C: FBML, limited HTML (iframe)
C: FBJS, no JQuery
F: HTML also FBML
F: JQuery & other JS
Drupal for Facebook Project
Here are a few features common to both canvas and connect apps (authmap table, wall posts & status updates (streams), profile tabs (similar to canvas pages), extended permissions, request forms, 3rd-party modules (views), extensible via hook_fb().)