I have a rails 4 app and I want to use the Facebook social plugin for comments. I have this code: in show.html.erb I have
<div class="fb-comments" data-href="my site name" data-numposts="5" data-colorscheme="light"></div>
in application.js:
( 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=644565478915600";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
And after my tag tag:
<div id="fb-root"></div>
When I go to the page, comments appear only after the update. Why?
source
share