Let's face it, everybody and their mother are using Facebooknowadays. 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
- Drupal 7 installed (this tutorial uses version 7.9)
- Drupal for Facebook -module (note that this module is still in development! In this tutorial, we will be using 7.x-3.x-dev, dated 2011-Nov-10)
- PHP SDK for the Facebook API on GitHub
- Facebook Account
Step 1: Downloading all the necessary files
- Install Drupal 7 and set it up.
- Download "Drupal for Facebook" -module
- Go to "PHP SDK for the Facebook API"-page on GitHub and download the latest PHP SDK for Facebook.
- Extract the files to "sites/all/libraries/facebook-php-sdk"
Step 2: Creating a new Facebook Application
- Go to "Facebook Developers"-page and select "Create new application"
- Write your "App Display Name" and accept the "Facebook Platform Policies"
- 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
- Login as Admin to your Drupal site and go to "Modules" (admin/modules)
- Under "Drupal for Facebook"-fieldset, choose "Facebook API", "Facebook App" and "Facebook Connect" and click "Save".
- Go to "Drupal for Facebook"-settings (admin/structure/fb) and click "Add App"
- On "Label", write a name for this App, like "fblogin1". On "Facebook App ID" and "Secret" write the info from the Facebook page before.
- 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".
No comments:
Post a Comment