Hi, Guys I need to include the comment plugin for my site, I have actually done this once, but it was manually. Like, below a set of text, I just placed the comment plugin, I had copied from my page, and it worked. But, this time I am working on is a dynamic site, and with new articles posted on the site, I need a comment box to appear below it. txs
Place the following code in the header: http://developers.facebook.com/docs/reference/plugins/comments/ will generate a similar code with application id. <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=[Application ID]"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> Code (markup): ... and add the following where you want the actual commenting system to appear: <div class="fb-comments" data-href="<?=$url_of_page;?>" data-num-posts="2" data-width="470"></div> Code (markup): The only variable which has to be edited is the data-href attribute of the div however you can easily build the link of the current page. (file.php?id=$_GET["id"]&stm=$_GET["stm"])