How to add Facebook comment box for websites having dynamic web pages

Facebook comment box integration in cms sites

\Adding facebook comment system to a particular website ;its very simple task, most of the web masters know about that process.But the limitation of this normal process is that the same comment was appearing on all web pages. but adding facebook comment system to a dynamic web sites having large number of web pages and also it will grow each day .Such dynamic websites need something different;that is if all the pages shows the same comment,it will became inappropriate.This task got me confused for a while,and finally I found a new solution .I hope that will works fine .I used the same technique in this website also.

Follow these steps..

I hope normally all webmasters knows about the initial steps for creating a facebook apps for particular Facebook social plugin.Its very easy..

Follow these simple steps..

1. At the head section of your website,(means in between <head> Here </head> ) add the code below:

<meta property=”fb:app_id” content=”YOUR_APP_ID” />
<meta property=”fb:admins” content=”{YOUR_PROFILE_ID}”/>

2.After that Paste the below code right after the opening <body> tag

<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); = id;
js.src = “//”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));


3.Then Paste this code Where ever you want to comment box to appear in the body of your website

<div class=”fb-comments” data-href=”” data-width=”470″ data-num-posts=”3″></div>

$(“.fb-comments”).attr(“data-href”, window.location.href);


You must change these values with your own

2.YOUR_PROFILE_ID -with your own website domain

you can change these also if you like..

data-width=”your own value larger than 470″
data-num-posts=”your own value larger than 1″

That’s all..