jQuery plugin to create Facebook like button with callabacks (Like and Unlike)

There are times when you want to know if user Facebook Liked or Unliked your page. Facebook provide an API for that, also there are times when you want to generate Like button on the fly rather including the code upfront in your HTML file. This requirement can be result of N ideas.

My first attempt for generate Facebook Like buttons on the Fly where user/developer is able to detect if User Liked or Unliked your page is below

Without wasting more of your precious time lets jump straight into our code

Plugin Name


The Markup

Here is an example markup required to use this plugin.

The Plugin Code

You should always get the latest version from GIT. The below source can be dated in many ways, Link to GIT hosted files is provided at the end of this post


Here is one example usage


Yes! It take time and effort so please consider donations

You can choose your own amount. Developing this plugin like these toke a lot of effort and time; days and weeks of continuous voluntary unpaid work.
If you like this plugin or if you are using it for commercial websites, please consider a donation to the author to
help support future updates and development.

        Main uses of Donations

  1. Web Hosting Fees
  2. Cable Internet Fees
  3. Time/Value Reimbursement
  4. Motivation for Continuous Improvements


If there isn’t any demo, it doesn’t work. So here is a link to demo to make sure it works



Get Facebook API key




Fork it on Git


I hope that this plugin will help you. Just in case if you find a bug or you can improve the above code please leave your comments. First attempt does always have room for improvement.





  1. Grreat post. I was checking constantly this blog and I’m impressed!
    Very useful info particularly the last part 🙂 I care for such info
    much. I was looking for this certain info for a long time.

    Thank you and good luck.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.