All ArticlesMisc

facebook like button hack

I was wondering how they do it. You come to a website like, you think its a simple video player and click the play button. Suddenly you have clicked an invisible facebook like button! How can this happen? The facebook Like-Button is an iFrame. It is pretty difficult these days to hack an iFrame and change its content to look like an video player.

After I had a look in the source code of the side, I recognized its acctually a pretty simple and effective hack. Nice idea, even if its not really "likable"!

2 Steps:

1. Make the Button invisible

The solution is (have a look at the screenshot) that the like button iFrame is inside a 2px big iFrame again. 2px in width and height which makes it pretty invisible. But if its so tiny, how can you click it?

2. Let the Button follow your mouse

The iFrame is inside a div, which follows your mouse pointer all the time via javascript. So wherever you click on the page you always hit the LIKE BUTTON!

Well well well.... I Like the idea, not the consequences :-) Also it´s against the facebook policies if you mind...




About this Article

christoph.diefenthal: facebook like button hack

written by: christoph.diefenthal on 17 Mar 2011

news stored under: Misc

share this article:

Comments (3)

Nadica (posted on 25 Feb 2012, 20:34)


sharil azmin (posted on 19 Apr 2012, 19:37)

i want 100 people like my status

khairul ikhwan (posted on 01 Sep 2012, 22:01)

laalalalala.. g0od muning allss ~~ MOOD:gembira di pagi hari :))

Tell us what you think!