According to Satnam Narang a security response manager for Symantec “What really happens when you paste this code into your browser console window is that a series of actions are performed using your Facebook account without your knowledge.
"Behind the scenes, your account is used to follow lists and users, and give likes to pages in order to inflate the follower and like counts defined by the scammers,”
Next time somebody tells you to insert a code or a javascript to hack one of your friends, know that you are the only one getting hacked.