Saturday, August 11, 2012

Add your Facebook fan page by a Gadget........

JavaScript - 05

As we all realized Facebook is a nice social network network for all. It is a very effective media of advertising your site through out the world even with out any payment. Therefore today I am going to introduce you a Facebook gadget that helps you to get traffic to your website and fan page reciprocally.

How can you introduce the gadget....?

First of all you have to add the following code to your template. If it doesn't has such yet(if you have introduce Facebook gadget earlier, it may be in your template). This will help to support our next gadget. Therefore it is necessary to add this before all. You have to follow following steps to add this.
1. Go to the Dashboard.

2. Open the template.

3. Select edit Html.

4. Then if you are not sure save the template and proceed the procedure.

5. Then find </body> tag.

6. Introduce following code just above to it and save the template after the preview.


<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); = id;
  js.src = "//";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


Adding of the Facebook like gadget

After introducing above code to your blog you have to introduce your gadget to your layout to that follow this steps.
7. Go to Dashboard again.

8. Then select add Html/JavaScript.

9. Add following code in the javascript gadget.

<div class="fb-like" data-href="your-fan-page-URL" data-send="true" data-width="450" data-show-faces="true" data-font="arial"></div>                                                                                                                

10. Edit the green colored text with your fan page URL

11. Save the template and you can see nice gadget has inserted.

I hope all of you will enjoy this gadget and add to your blog too. If you have any quarries please make a comment or contact me.

For more reference;
Facebook Developers


  1. We appreciate any comments from you.......

  2. Great Ideas Dragon Hunter95..But i think Google PLus is now going up as compared to Facebook...By the way learned much for your post

    1. yap Google has battle the Facebook. But still has not completely done. But the Google has the more power.......