Facebook comment box not displaying - facebook

I have project in wordpress with magazine theme. I noticed the facebook comment box was not displaying on single.php page. when I viewed through 'View Page Source' the code was present even space was left for comment box between the article and advertisement. I checked css for display:none or any other thing that might have caused but no solution yet.
I am getting that div as
where data-href is coming as "./" Please help.

Working sample:
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
<title></title>
</head>
<body>
<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 = "https://connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<fb:comments href="http://stackoverflow.com/" numposts="5" colorscheme="light"></fb:comments>
</body>
</html>

Related

Facebook Comments Moderation Tool not enabled

I have Facebook Comments on internal page - you have to login to see it. I configured it according to docs (I believe). Comments widget is displayed. I can add comments from different accounts and I can see them but there is no Moderation Tool button and comments are not shown on https://developers.facebook.com/tools/comments/ I tried 3 configurations. None worked for me. What am I doing wrong?
Configuration 1
In head
<meta property="fb:admins" content="facebook admins"/>
After opening body tag
<div id="fb-root"></div>
<script>
/* <![CDATA[ */
(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/pl_PL/sdk.js#xfbml=1&version=v2.6";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
/* ]]> */
</script>
Later on page
<div class="fb-comments" data-href="url to this specific article" data-width="100%"></div>
Configuration 2
In head
<meta property="fb:app_id" content="facebook app id"/>
After opening body tag
<div id="fb-root"></div>
<script>
/* <![CDATA[ */
(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/pl_PL/sdk.js#xfbml=1&version=v2.6&appId=facebook app id";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
/* ]]> */
</script>
Later on page
<div class="fb-comments" data-href="url to this specific article" data-width="100%"></div>
Configuration 3 (mix of both)
In head
<meta property="fb:app_id" content="facebook app id"/>
<meta property="fb:admins" content="facebook admins"/>
After opening body tag
<div id="fb-root"></div>
<script>
/* <![CDATA[ */
(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/pl_PL/sdk.js#xfbml=1&version=v2.6&appId=facebook app id";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
/* ]]> */
</script>
Later on page
<div class="fb-comments" data-href="url to this specific article" data-width="100%"></div>
Common app settings
Comments widget on my page when I (admin) am logged in
I had same problem. I also tried all combination.
Go to https://developers.facebook.com/tools/debug/
Paste the url.
The problem will be shown in "Warnings That Should Be Fixed"
I had a problem with app_id.
Also, you can specify either fb:app_id or fb:admins, but not both.

Facebook LIkebox Code loads when in html file but not when in body of Wordpress page

I've been trying to figure out why the code for my likebox will not work when I paste it into my page but it will load just fine when the same code is used in an html file. I got the code from the official facebook dev generator. The script code is in header.php and the code with the div that should call the js up is in the body of the message as raw html. Still, I'm getting nothing.
Has anyone else experienced this?
The following code will work when loaded from my computer. Will not work when I upload the same file to (loft3.com/hp.html) or when I try to use the code in header.php and call the second part in my post.
<html>
<body>
<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 = "http://connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like-box" data-href="http://www.facebook.com/hp" data-width="800" data-show-faces="true" data-header="false" data-stream="true" data-show-border="false"></div>
</body>
</html>

Comment box half cutoff

My Facebook comment box is cut off half way. I saved this as HTML and opened it with Safari, Chrome and Firefox but they're all half cutoff. How do I fix that?
I have been trying for a long time and cannot get it to work. For simplicity's sake, I am using only the necessary code for the comment box:
<html>
<head>
</head>
<body>
<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 = "http://connect.facebook.net/en_GB/all.js#xfbml=1&appId=170045126459927";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-comments" data-href="http://example.com" data-num-posts="2" data-width="470"></div>
</body>
</html>
Also, the page won't stop showing the loading sign.
The problem comes from your CSS file:
If you are using a Pluggin, you have to quit all the codes like
. facebook-comment { width: 95px !important; }
These codes are setting-up automatically by the plugin and don't allow you to settle the facebook comment box as you want.
Once you have done that, you can create a in your PHP console and then adding this class in your CSS file to customize your box as you want.

Thread Options Facebook Comments Plugin Not Working On Chrome

How to make Facebook Comments plugin work on Google Chrome? It shows up in IE9 and Opera, but for some reason isn't accessible on Google Chrome.
Thanks in advance!
Codes Used(From Facebook Developers Comments):
<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";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
and
<div class="fb-comments" data-href="http://websiteurl....." data-num-posts="1" data-width="500"></div>
Have you added the facebook xmlns attribute in the html header? I had some problems in a webpage with this plugin untill I added it.
<html lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
Besides, I use attributes in comments' div without the "data" and it works in all browsers:
<fb:comments href="WEB_URL" num_posts="10" width="500" notify="true"></fb:comments>

FB Comment Box not working

I am using FB Commentbox on my blog on bloggers, but it never displays. I am using this code
<b:if cond='data:blog.pageType == "item"'>
<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";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="googleplusblog.info" data-num-posts="10" data-width="500"></div>
</b:if>
And this in Head
<meta property="fb:app_id" content="XXXXXXXXXX98504"/>
<meta property="fb:admins" content="XXXXXXXXXX31342"/>
APP ID is the id which was generated when i created the app (i just created the app for ID, hadn't done any editing to its default settings)
Please tell me what i am doing wrong
You've probably discoved the answer by now, but for anyone else coming across this, you need to add the fb namespace to the page like this:
<html xmlns:fb="http://ogp.me/ns/fb#">