How to Use the Facebook Like Module for Drupal

Many people want to leverage the power of social media to let people know about their site. Adding the code for the facebook like on every page can be tedious, not to mention the configuration of the size, position, etc. This article demonstrates how to install and configure the module in your Drupal site.

How to Install and Configure the Facebook Like Module

  1. You will first need to download the Facebook Like module to your local computer.
  2. Log into your Drupal admin dashboard.
  3. From the top menu bar, locate the Modules option and click it.
  4. You are now on the Modules List screen. Be sure you are on the List tab, found in the upper right corner of the page. Click on the Install New Module link found at the top of the page.
    1-install-module

  5. On the module upload screen, click on the Browse button. From here, navigate to the folder in which the module is stored and click on Open.
  6. You should now see the path to the module in the Upload a module or theme archive to install. Click the Install button to complete the module installation.
    2-upload-module

  7. Once the module installs, you will be sent to a page that displays a successful install message. From there, click on the link entitled Enable Newly Added Modules.
    3-successfully installed

  8. You are taken back to the Modules list screen. From here, locate the Facebook Like module in the Other category. Select the checkbox to the left of the module name and click on the Save Configuration button at the bottom of the page. Once it is enabled, scroll down to the module again and click on the Configure link that now displays on the right side of the module name.
    4-click-configure

  9. From here you will have two choices: Dynamic and Static configuration. Select which version you want to configure. The Dynamic setting means the like button will be used to like whatever page is showing. The Static configuration allows you to set a single URL for the like to reference, no matter what page the like button is on. Each configuration has its own settings to configure. Once you have adjusted your settings, click the Save Configuration button at the bottom of the page.

    Dynamic Settings

    Display the Like button on these content typesSelect which content types you want to display the button.
    Where do you want to show the Like button (full node view)Select where you want to display the button in regards to content layout.
    Where do you want to show the Like button on teasersWhere the button will display on the teasers, or even no display at all.
    Width of the iframe (px)Set the width of the button area.
    Height of the iframe (px)Set the height of the button area.
    Extra css styling neededAny additional CSS styling you would like goes here.
    Layout styleSelect from the different layouts.
    Show faces in the boxSelect whether or not to display profile pics under thebutton.
    Verb to displaySelect whether you wand the verbs ‘Like’ or ‘Recommend’ to display.
    FontSelect the font type.
    Color schemeSelect from either ‘Light’ or ‘Dark’ color scheme.
    WeightSelect the level of importance (weight) that will determine the buttons position in the node.
    LanguageSelect which language you want the button to be in.

    Static Settings

    URLThe URL for which the button will be referencing. This will stay the same across all the nodes (pages, articles, etc) on the site.
    Layout styleSelect from the different layouts.
    Show faces in the boxSelect whether or not to display profile pics under thebutton.
    Verb to displaySelect whether you wand the verbs ‘Like’ or ‘Recommend’ to display.
    FontSelect the font type.
    Color schemeSelect from either ‘Light’ or ‘Dark’ color scheme.
    Width of the iframe (px)Set the width of the button area.
    Height of the iframe (px)Set the height of the button area.
    Extra css styling neededAny additional CSS styling you would like goes here.
    LanguageSelect which language you want the button to be in.
  10. Lastly, we need to enable the permissions of who can view the button. You will need to return to the Modules list screen, locate the Facebook Like module, and click on the Permissions link.
    6-click-permissions

  11. You are now on the main Permissions list. Find the Facebook Like Button area and select your options under the Access FB Like button setting. In this example, we enabled all of them so visitors, members, and admin can all view the button.
    7-select-permissions

    Your selected nodes (articles, pages, etc) should now display the button according to the permissions you set. Below is a screenshot displaying the Facebook Like button in action.
    facebooklikebutton-complete

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+