You are hereDrupal - Facebook Connect Module
Drupal - Facebook Connect Module
NOTE: A newer version of this module is available here.
This module enables users on your site to use their Facebook account and participate as registered users. This is intended for Drupal 6.x sites only. The best way to know more is to install this and try it out.
How this works
When a user comes to your site, they will see a Facebook Connect button in the login block (Figure 1. below). Clicking this button will prompt the Facebook Connect dialog (Figure 2. below) which will ask for permissions to connect. If they choose to go ahead, they will be prompted for an email address which will be used to create an account on your site which is in turn linked to their Facebook accounts. They can always login using their Facebook account there after.
Now on logging in, they will see a new Facebook Connect block which will show them a list of their friends also on your site and enable them to invite other friends. You can see an example in Figure 3. below.
Figure 1: Facebook Connect Login Button
Figure 2: Facebook Connect Login Dialog
Figure 3: Sample Facebook Connect Block
You can’t make configuration brain-dead simple. Unfortunately, that is how it is. There are a few steps needed to make this work.
- Install the module Fconnect under the directory <SiteRoot>/modules/fconnect
- Download the Facebook client library located at http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz.
- Copy the files under the directory <SiteRoot>/modules/fconnect/facebook-platform (Note: For Beta 1 this was <SiteRoot>/modules/fconnect/facebook-client, where <SiteRoot> is the root of the site.
- Next you will need to get application key and secret. To get that, create a facebook application. Visit http://www.facebook.com/developers/#/developers/createapp.php and fill up the form. Make sure your callback URL points to the site root (E.g., www.samplesite.com)
- Go to the module settings admin page and fill up the key/secret you get from Facebook (see figure 4. below). These settings will be available at <SiteRoot>/admin/settings/fconnect.
- Setup the Facebook Connect Block settings. You will see a new “Facebook Connect” block at <SiteRoot>/admin/build/block. Click configure to set properties (see figure 5. below) .
- This is the last but the most important part. This module uses facebook markup language. For this to work, we need to update the page.tpl.php file. This is as part of the template engine you are using. Please make the following change: <html xmlns="http://www.w3.org/1999/xhtml"> to <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
Figure 4: Facebook Connect Admin Settings
Figure 5: Facebook Connect Block settings
This site uses this module. Please feel free to try it out.
I wrote this module for personal use and it turned out pretty well. I thought I’d share it out. Give me a shout if you experience issues. I’ll try my best to attend to those. This is currently a Beta version.
Please let me know how you feel about this module. There are a lot of feature additions planned but would be glad to hear from you too.
If you feel you like this, please leave a tip.
Note: You will need to be logged in to download the module. Please login and while you are it try the fconnect module in action :).