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.
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:
SELECT LIKES FROM LIKEDATABASETABLE POST_ID=(POST ID);
{PRINT LIKE DATA}
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 below.so,whats is AJAX ?- read here
2 comments:
nice dude!
Good work bro!
Post a Comment
feel free to post your comments! Don't Spam here!