Monday, December 02, 2013

How does Facebook LIKE works ? - Learn more with @s.shivasurya

Have you ever wondered how does a Facebook Like system works?

yup! you have gone crazy about likes for posts,pages,events, and everything 

except your PRIVATE MESSAGES  :P .

Facebook like system is one of the best implementation in social network systems, may be in future based on like data Facebook is going to launch semantic search engine. 

It's all because of just a click action you might think.but there is a simple process to update database and make your friends to view them.if there is no like button then facebook has no market,because the third party companies are investing crores and crores on this like button and advertising.there is a lot of things going behind this every like button hits and sharings.It's all because of just thinking and implementing them and testing the capablity.

What happens when you like a post or something on facebook?

let me assume a post with unique id named no:6 having a status of a person,
sharing with his friends on timeline.

1)when you click the like button.ajax script which is just script sends the data to process to a another php file.

2)the script carries your  facebook post id and your userid 

to another php file.

3)so,the data will be taken and just inserted in to database as 

id--->(post id) and like_id---->(your facebook id) 

and a unique id for liking

so now the database will be updates in lightning speed because it is a mysql database has the power to query within 0.00000007 seconds(based on my queries experience)
4)so after updating database a success message will be recieved near the post that You like this.
5)note here that each like action doesn't reload your page.just because of AJAX script.

6)so when You like.the query results just display your liking action in facebook posts below just by few commands

example coding for viewing likes:



7)yes! just because of PHP+AJAX+MYSQL makes to like system better in facebook.

be just aware that don't hit like buttons out of facebook rather than it's facebook page.this post is just gave you basic knowledge about like system,there are major ways facebook implement in a such a way that helps them.

after Knowing this i had lost interest on facebook liking system!

if you feel free please comment,whats is AJAX ?- read here


Algorithm Freak, Coder, Web And Android Developer, love to develop Apps for Local Business in my Freetime. For Queries,Quotes Drop me a Mail to


Anonymous said...

nice dude!

Anonymous said...

Good work bro!

Post a Comment

feel free to post your comments! Don't Spam here! Registered & Protected  Z6HO-DGFO-S2CO-JRZGCopyrights Protected (C)2013-2015 i-visionblog ~ s.shivasurya.

Designed and Maintained by S.Shivasurya | S.Shivasurya