-1

I would like a javascript bookmarklet that will "click" on the facebook "like" button on my web site. Its for an automated program so it can automatically have that user like the home page of my program.

Is this possible?

Seatbelt99
  • 53
  • 1
  • 7
  • Bookmarklets have to be installed by the user. Why not just have the user press the Like button themselves? – ceejayoz Dec 08 '10 at 19:11
  • 5
    1) That's evil sounding, 2) are you looking for something like this: http://www.readwriteweb.com/archives/how_to_like_anything_on_the_web_safely.php – Kevin Stock Dec 08 '10 at 19:13

1 Answers1

6

This is going to be impossible due to the Single Origin Policy that will not allow you to simulate a click in an iframe that does not belong to your domain (or make a cross-domain request to Facebook, for that matter).

And thank Goodness! What you are trying to do sounds like something Facebook (or any other provider of such buttons) would want to prevent.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • 2
    Not meant to be evil or fraudulant though I can see how it could be used that way. Just was thinking I could make it an option in my program to save users some time but I'm sure I can just put the button right up front and have them manually click it. I just did not like how that looked. Oh well, thanks to all for letting me know. – Seatbelt99 Dec 08 '10 at 19:24