Facebook Style Like/Unlike button with Collapsed Comments Script using jQuery and PHP.

Author: Zeeshan Rasool  |  Sep 26, 2010 JQuery, PHP, Tutorials, Web Design

Another post in facebook style tutorials series at 99Points.info. You have seen facebook like/unlike button if you want to like a post you simple click on “Like” button. Also, you have seen collapsed comments there and when you click on show all comments button it shows all comments. I created this thing and I tried to create same style as it is on facebook. Please share this if you like and dont forget to subscribe by email.
Note: No spams and newsletters for subscribers. Thanks !

[ad#co-7]

No Spams or Newsletters will be send to Subscribers.

Enter your email to subscribe :

Delivered by FeedBurner

[ad#ad-4]


Other Facebook Style Tutorials + Popular Tutorials on 99Points

Database Structure

I used 4 tables for this tutorial, one for saving posts, other for saving comments against that post, one for saving likes of posts and last one is to store IP addresses of users. I used IP to save user likes but when you will use it you should use user ID instead of IP so that you can accurately identify that current user already liked or not.

JQuery Code

Like.php

Unlike.php

View_comments.php

Download all the files and use this stylish tutorial. Thanks !
[ad#co-3]

Recommended WordPress Themes Stores



If you enjoyed this post, please consider leaving a comment below or subscribing to the RSS feed to have future articles delivered to your feed reader. You can also follow us on Facebook or Twitter @99Points

This awesome post has been created by 99Points editor's team. You can follow our updates on Twitter and facebook, OR drop an email at 99points.info@gmail.com



Email Subscriber!

Be the first to know about new updates


Author of 99Points
Zeeshan Rasool is an experienced PHP Web Developer and founder at 99Points. Expert in Codeigniter (MVC), WordPress, JSON, jQuery & HTML5
 LinkedIn Profile  About.me


Advertisement




Friends


Categories


Popular post