Connecting organizations to their markets

Leveraging Drupal in Facebook

Last spring at their f8 conference, Facebook announced a major revamp of the Facebook Platform for interfacing with the outside world.  These new and updated tools address what Facebook calls the "Social Graph" by providing ways to both push your structured data into Facebook and pull Facebook data out of it.  If leveraging Facebook's users fits with your marketing strategy, then this development may be something to examine closely.

The new Facebook Platform

The API consists of a mix of new tools and updates to some of the existing ones.  Unfortunately, if you already have built on the old API, you may find that some of the old tools you relied on are on the way out.

You can breakdown Facebook's API into the follow areas: 

Graph API The nuts and bolts set of functions that enable you to read and write Facebook data.  The Graph API provides access to facebook objects like people, photos, events and pages and wells the connections between them like friendships, likes and tags.
Authentication Based on the OAuth 2.0 industry standard, this portion of the API lets you ask Facebook users for permission to do things.  Built on Facebook Connect, released in 2008, it allows you to those two-way connection with Facebook users.  Some examples are using a user's Facebook account as the basis for their account on your website and writing posts on a user's Facebook wall.  The system supports a rich set of "extended permissions" that greatly increase the value of Facebook connect.
Social Plugins These plugins provide a set of tools for you to use Facebook directly on your site.  Often, these tools only require a single line of code to be embedded in your code to implement.  The plugins range from Like buttons and boxes to Recommendations and Activity feeds.
Open Graph
 Wrapping it up, through the Open Graph API, Facebook is providing the ability to make your sites pages into virtual Facebook pages.  When someone "likes" your page, your page will show up in the user's "likes and interests section" much like if they had liked your old facebook page.

Now you ask, "so what do this mean for me and my website?"  Well the good news is that the Drupal community has, in its typical fashion, several contributed modules that will connect a Drupal site to Facebook.  As Facebook and Drupal are both built on PHP, there is a natural fit between them.  Connect2Market has been working help clients leverage the Facebook Platform and I can fill you in on what we have found.

Getting your toes wet

First, the low hanging fruit in all of the platform are the social plugins.  These plugins require minimal effort and can be implemented in literally seconds. 

Like this:

Pretty cool, eh?  Go ahead, click it (I'd appreciate it!)  What this does is make your page an extension of Facebook.  When a visitor clicks the button on your page, it becomes "liked" by the user; much like they might "like" a photo or a Facebook "page".  A story will appear about your page in the user's News feed.  Facebook provides a nice wizard for creating these plugin from their Social Plugins page where you can check out the various plugins available.

Going a little deeper

Now, that's nice and all, but you really haven't told Facebook much about what the page is about or linked it with anything inside Facebook.  That is where their Open Graph protocol comes into play.  The open graph allows you to attach more data as you communicate it to Facebook.  The basic tags are title, type of object, an image, and the url of the object.  In addition, host of other attributes are available for things like location, contact information, or your facebook "page". 

Best of all, if you have set the minimum set of tags, you get the ability to publish in the future to the users Facebook stream.  So if they "like" an event you are planning, you can publish updates to these users as the event nears.  These tags must be placed in the page's head section, so they are more involved than those Social Plugins above.  If you are using Drupal, then take can be automated for the most part.  The Nodewords module has development being tested to support these tags.

Going all out (and in!)

Now, if you have a Drupal based website application, you can really juice things up; both using Facebook inside your site and using your Drupal application to drive your content in Facebook.  Here at Connect2Market, we have focused on the module Drupal for Facebook as it looks to support the most functionality with an active development stream.  This module provides the both the in and the out of Facebook.

Going into Facebook

While Facebook has had "Pages" for some years now for organizations to have a presence on Facebook, most of them look pretty dull.  The typical Page has some static content in sidebar boxes and tabs surrounding a stream of stories.  While they provided some means to push content in with a feed, it wasn't easy and not particularly rich.  Most organizations end up just hand creating the content a second time in Facebook.  If they did it twice, the essential link between the content was missing.

Enter "Canvas" pages.  With the new platform and Drupal for Facebook, you can turn your Drupal website application into an official Facebook Application.  You can create a special page on your site that shows up inside your application's page in Facebook.  This allows you use all the goodness of Drupal to deliver a context relavent page inside Facebook.

The Drupal for Facebook developers provide an example.  First, see their Drupal site below.  Note the content that is shown. (Click the image to open their site live.)

Drupal for Facebook website

Next, check out their Application's Facebook page.

Drupal for Facebook app page

Notice that the content on both pages is mostly the same.  You have to do some heavy lifting to make it look great as your site's content has to fit into a box on the Facebook side that is probably small than your websites layout.  Some theming work, but probably not too bad.

Going out of Facebook

So you can push into Facebook, but how can it help you on your site?  Well, one of the hurdles for many websites is user registration.  You want build a relationship with your users, but that means you have to set up an account and they need to fill out a form.  Ugh. 

Enter Facebook Connect.  The Drupal for Facebook module provides the ability to Facebook users (and the information they share with you) to a Drupal user account.  The module provides a "Facebook Connect" button like this: 

Facebook Connect Login button  

Goodbye user registration form!  When the Facebook user clicks this button, they get the familiar permissions box and you are good to go.  You can get email addresses, user profile pictures, and more with this tool.  For many applications, this functionality is heavenly.

On top of the user registration gem with data coming into to your site, you have built a connection to the Facebook user that let's you engage with them through stream publishing and other means.  You get to leverage your Facebook user's networks too as when you publish to their stream, you can get exposure on their friends wall.  Remember that "Canvas" page we talked about before?  Well, now when one of your connected users visits your canvas page, they will be logged into your site and you can deliver a page custom to what you know they want.

Let me know if you would like to know more!