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

Author: Zeeshan Rasool  |  Last updated on JQuery, PHP Tutorials, 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 don’t forget to subscribe by email.
Note: No spams and newsletters for subscribers. Thanks !

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

Download all the files and use this stylish tutorial. Thanks !

Recommended WordPress Themes Store

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



Popular post