How to use Facebook Connect in Drupal

Let's face it, everybody and their mother are using Facebook nowadays. So having Facebook Connect as an login option would be really beneficial on your Drupal site.

Some of the reasons for this are:

  • Users don't need to register on your website.
  • Users can use the same username, no need to remember usernames & passwords.

 

It is also fairly easy to setup. Let's begin!

 

Requirements

 

Step 1: Downloading all the necessary files

  1. Install Drupal 7 and set it up.
  2. Download "Drupal for Facebook" -module
  3. Go to "PHP SDK for the Facebook API"-page on GitHub and download the latest PHP SDK for Facebook.
  4. Extract the files to "sites/all/libraries/facebook-php-sdk"

 

Step 2: Creating a new Facebook Application

  1. Go to "Facebook Developers"-page and select "Create new application"
  2. Write your "App Display Name" and accept the "Facebook Platform Policies"
  3. Keep the page open, we will need the APP ID & Secret later. You can also setup the icon for the Application on this page. Users when see it when logging in on your website

 

Step 3: Enabling the Facebook module

  1. Login as Admin to your Drupal site and go to "Modules" (admin/modules)
  2. Under "Drupal for Facebook"-fieldset, choose "Facebook API", "Facebook App" and "Facebook Connect" and click "Save".
  3. Go to "Drupal for Facebook"-settings (admin/structure/fb) and click "Add App"
  4. On "Label", write a name for this App, like "fblogin1". On "Facebook App ID" and "Secret" write the info from the Facebook page before.
  5. Select "Primary" under "Facebook Connect" and click "Save".

 

And you are all done! In "Blocks", there should now be a new block "Facebook Connect Login". Apply that to the region you want hit "Save". 

Comments

Which module is recommended to post new contents to Facebook?

Add new comment