Drupal and Facebook are now friends

Technology Blog

FriendsI’m working on a new Facebook application for a client and being a lazy programmer I wanted to do as little work as possible while producing a good result.

I’d started building the app with the Zend Framework but while it is many ways an excellent library it is as yet only a starting point. To build any sort of real-world application with the Zend Framework will require considerable effort, and I was beginning to think this job was going to be a headache.

Imagine my delight, then, at finding Dave Cohen had written a Facebook integration module for my favourite platform, Drupal. Could that solve my development problems?

Life of course is never that simple. I’m not criticising this module, which is really useful. If I explain what it does, perhaps things will become clearer.

Drupal for Facebook does an excellent job of of making it easy to turn Drupal applications into Facebook ones. So if you have an existing discussion area, blog, or anything similar implemented in Drupal, this module provides most of the tools you’ll need to migrate it to Facebook. That’s great.

However, if you are trying to create a new application designed from the outset to make use of the Facebook API, then Drupal for Facebook only solves part of the problem. You’ll still need to make direct calls to the API and code FBML to build your pages. One thing you won’t have to worry about is authentication as Drupal for Facebook takes care of that very neatly. Facebook users become Drupal users, assigned a special role so you can readily control access to system resources in the standard Drupal way.

Drupal for Facebook could be improved by the addition of a few “Facebook widgets” – code for common UI elements such as lists of friends with their profile pictures. For my own application I’ve developed the ones I need as I go along. Drupal for Facebook provides a customisable Facebook-only theme, the logical and convenient place to add such extensions. With this approach you have the added benefit of being able to have a non-Facebook equivalent to each “widget”, useful for testing purposes.

Drupal for Facebook is in active development and there are still some odd bugs and peculiarities to work round. It’s bleeding edge technology – but that’s what we Facebook developers are used to. I look forward to seeing it mature and grow into something even cooler.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>