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

jcFacebookLike.js

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

Usage

Here is one example usage

Donate

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

Demo

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

http://jaspreetchahal.org/examples/jquery-examples/likes/jcFacebookLike.html

 

Get Facebook API key

https://developers.facebook.com/apps

License

MIT/GPL

Fork it on Git

https://github.com/jaschahal/jcFacebookLike

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.

 

Cheers

 

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
jQuery plugin to create Facebook like button with callabacks (Like and Unlike), 5.0 out of 5 based on 1 rating

Comments

  1. seo Hitchin says:

    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