Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<link rel="stylesheet" href="http://static.ak.fbcdn.net/rsrc.php/zD5ZK/hash/4146lpfk.css" type="text/css" />
<script type="text/javascript">
var fbURL = PASTE_FACEBOOK_URL_HERE;
function insertLikeButton() {
var container = document.getElementById('flbCont');
var w = container.style.width;
var h = container.style.height;
fbFrame = document.createElement("IFRAME");
fbFrame.setAttribute("src", fbURL);
fbFrame.setAttribute("scrolling", "no");
fbFrame.setAttribute("frameBorder", 0);
fbFrame.setAttribute("allowTransparency", true);
fbFrame.style.border = "none";
fbFrame.style.overflow = "hidden";
fbFrame.style.width = w;
fbFrame.style.height = h;
container.replaceChild(fbFrame, document.getElementById('flb'));
}
</script>
<div id="flbCont" class="connect_widget">
<a id="flb" class="connect_widget_like_button clearfix like_button_no_like" onclick="insertLikeButton();" style="cursor:pointer;-moz-outline-style:none;text-decoration:none"><span class="liketext" style="line-height:1">Show Facebook Likes</span></a>
</div>
@gyanenmhz

This comment has been minimized.

Copy link

@gyanenmhz gyanenmhz commented Nov 29, 2011

can u expalin this trick..
u know sir ,"play the video" button is linked with facebook like , when we click it, it published directly to our news feeds http://www.facebook.com/pages/Caution-Wet-Paint-LOL/251653061560367
i'm a newbie

@dorianroy

This comment has been minimized.

Copy link
Owner Author

@dorianroy dorianroy commented Nov 29, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment