Integrating Drupal and Facebook
Problem
I have an existing site built with Drupal (http://drupal.org/) and I’d like to create an associated Facebook application quickly and easily. It’s important to be able to reuse the existing content and user base for the new application.
Solution
Drupal for Facebook (http://drupal.org/project/fb) is an existing Drupal module with an associated FBML theme that can quickly and easily create one or more Facebook applications for an existing site.
Discussion
To begin, create your application on Facebook as you normally would, but leave the callback URL blank for now.
Next, download the Drupal for Facebook module from http://drupal.org/project/fb and install it per the included README.txt. The instructions here include downloading a copy of the Facebook PHP library and installing the associated FBML theme.
Once those steps are complete, it is time to enable some modules. The Facebook for Drupal package comes with several modules so that you can enable only the modules your application requires. A good starter set is “Facebook API,” “Facebook Application,” “Facebook Application Canvas Pages,” and “Facebook User Management.” Note, however, that there are modules for integrating things like the popular Views and Actions modules for Drupal.
Now we’re ready to create applications. Go to Create content→Facebook Application, and fill out the form with information about the application you already created, such as the API ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access