Skip to content

Instantly share code, notes, and snippets.

Created April 25, 2010 18:20
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
<link rel="stylesheet" href="" type="text/css" />
<script type="text/javascript">
function insertLikeButton() {
var container = document.getElementById('flbCont');
var w =;
var h =;
fbFrame = document.createElement("IFRAME");
fbFrame.setAttribute("src", fbURL);
fbFrame.setAttribute("scrolling", "no");
fbFrame.setAttribute("frameBorder", 0);
fbFrame.setAttribute("allowTransparency", true); = "none"; = "hidden"; = w; = h;
container.replaceChild(fbFrame, document.getElementById('flb'));
<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>
Copy link

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
i'm a newbie

Copy link

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