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

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 !

Comments are closed.