Trying to add the official Facebook comments plugin. plugin loads fine but I cannot change the theme or color scheme.
According to Facebook:
colorscheme
is one of the settings for the plugin and it's controlled via a custom html5 attribute. That attribute is data-colorscheme
.
The color scheme used by the comments plugin. Can be "light" or "dark".
I want the dark color scheme, wouldn't that be data-colorscheme="dark"
?
I tried that and it doesn't have any effect.
<div class="fb-comments" data-href="https://developers.facebook.com/docs/plugins/comments#configurator" data-colorscheme="dark" data-href="https://developers.facebook.com/docs/plugins/comments#configurator" data-numposts="5"></div>
here's my full code.
<body>
<div id="fb-root"></div> <!-- load sdk -->
<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/sdk.js#xfbml=1&version=v2.10";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div></div> <!-- page content -->
<div></div> <!-- page content -->
<div></div> <!-- page content -->
<div></div> <!-- page content -->
<div></div> <!-- page content -->
<div></div> <!-- page content -->
<div></div> <!-- page content -->
<div></div> <!-- page content -->
<div class="fb-comments" data-href="https://developers.facebook.com/docs/plugins/comments#configurator" data-colorscheme="dark" data-href="https://developers.facebook.com/docs/plugins/comments#configurator" data-numposts="5"></div> <!-- FB comments with attr data-colorscheme="dark" -->
</body>
You add
data-href=""
property two times. Please try this: