I've spent countless hours for the past couple of days trying to get this tiny thing to work. It's just so frustrating wasting hours on such a small task. To sum up, I have a Facebook page and an HTML page, and i'd like to include a Like button on my HTML page. I've gone through the process here at https://developers.facebook.com/docs/plugins/like-button
and I've copy/pasted the code in my empty HTML page. Whenever i run it, it shows an empty page with no buttons whatsoever. I've tried many tests, and the output is always empty. When i run the HTML, this is the address that's being processed:
file:///C:/Users/toshiba/Desktop/test%20like.html
<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/sdk.js#xfbml=1&version=v2.5&appId=1521075254860950";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like" data-href="https://www.facebook.com/CGD2016/" data-width="100px" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
I have also tried Facebook's "Full Code Example" and the result was the same, I feel it has something to do with the Javascript SDK, but i cant quiet get my hands on the problem. I'll keep trying other methods, but please, if you understand why this is happening I would greatly appreciate your help.
<!-- You can use open graph tags to customize link previews.
Learn more: https://developers.facebook.com/docs/sharing/webmasters -->
<meta property="og:url" content="https://www.facebook.com/CGD2016/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="FB Like test" />
<meta property="og:description" content="Your description" />
<meta property="og:image" content="http://www.your-domain.com/path/image.jpg" />
<!-- Load Facebook SDK for JavaScript -->
<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/sdk.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Your like button code -->
<div class="fb-like"
data-href="https://www.facebook.com/CGD2016/"
data-layout="standard"
data-action="like"
data-show-faces="true">
</div>
I've tried using Chrome and IE, both with empty results.. thanks