Adding a Facebook “Like” block to your Drupal site

I just added the newly announced “Like” button to my blog. It’s very easy to do on Drupal.

First, enable PHP input format…
In Drupal 6, the PHP input format is not enabled by default – it has to be enabled by enabling an additional module. So go to admin/build/modules and enable:
PHP filter 6.8 Allows embedded PHP code/snippets to be evaluated.

Next, create your new block…
Go to #Administer, #Site building, #Blocks
Click on the “add blocks” tab
Enter in a Block description and put the following in the Block body:


Change the “Input format” to “PHP Code”

Save it and you’re done!

10 thoughts on “Adding a Facebook “Like” block to your Drupal site”

  1. Hello, Dear 🙂
    Please, help me.. I did everything, like You recommended, but i cannot see the Facebook like button, only the name of the Block and the same text which You suggested to put in the Block body 🙁
    Maybe You know how could i fix it?
    Thankfully,
    Ausra.

  2. Thanks so much JerryJr!!! it works like a charm!!

    I have another facebook share module and I needed to fix the width to 60% to make them align.

Comments are closed.