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>
Related
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>
I currently have a Like-Box that is only visible while I'm in Safari on my MacBook.
The following are unable to view the like-box (that I have tested so far):
Chrome,Safari (mobile) (iPhone4,4S,5,iPad), Firefox
Is functionality restricted to a certain Java setup? I pulled the code directly from Facebook and have included the Java as they recommend.
Thanks in advance!
Code in question:
Facebook-supplied block:
<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=MYAPPID";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
LikeBox:
<div class="fb-like" data-href="https://www.facebook.com/pages/MyPage/MyID" data- send="false" data-width="60" data-show-faces="true"></div>
</div>
Please Note that I have deidentified my Page and ID, thanks.
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>
I am trying to get the Activity Feed Social Plugin to display on this website: http://wrdtempsite.com.au/qualdes/
(It's WordPress run and has the WordPress SEO plugin installed which has FB meta data)
Nothing shows at all, but I get no errors. (It should display on the right hand side of the homepage).
Code below:
<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_GB/all.js#xfbml=1&appId=XXXXX";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-activity" data-site="http://wrdtempsite.com.au/qualdes/" data-app-id="XXXXX" data-width="300" data-height="600" data-header="true" data-recommendations="false"></div>
I cannot see what is wrong? Any help would be much appreciated.
Thanks
It was a css rule that was basically 'hiding' the widget from view.
.fb_iframe_widget iframe {position:absolute;}
I changed that to position relative.
I am trying to use the facebook like plugin which has a like and send button.The source code of my page is as follows-
<html>
<body>
hello
<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=138876406236026";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-send"></div>
</body>
Why is it not working?
it wont work on your local system ,you should put it in your website ,
ex: www.sample.com ,
The facebook social buttons work locally on a computer.When you put them online on your website,they will work :)