0
votes

I am trying to implement the Facebook "Like" plugin on our companies e-commerce site. The site in question is http://www.bmlbasic.com and the code that Facebook gave me is:

<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-like" data-href="http://www.facebook.com/bmlbasic" data-send="false"
data-width="450" data-show-faces="true"></div>

I have tried multiple ways of implementing this, via URL, HTML5, and iFrame but none of these methods have worked. Could someone walk me through what I'm doing wrong, or figure out what is going on? I noticed also that Facebook mentioned some changes regarding absolute URL's, not sure if that is part of my problem as well. Thanks for any advice!

1
Do you have any JavaScript error/warning when you open the console? - glautrou
"none of these methods have worked" - can you describe how they've failed - Jonathon Reinhart
@glautrou I am implementing it first on a test website, not a good idea to put it up before figuring out if it works lol. To answer your question though, when testing it, looked through the console and no errors appeared to me. - Jacob Brogdon
@Jonathon When I put the code in, nothing happens. When I bring up the html page nothing appears, except for the iframe method, and it simply shows the code for it on the webpage, where the Like button should be. - Jacob Brogdon

1 Answers

0
votes

I tested on JSFiddle and it works.

If you look at Facebook roadmap there was a breaking change published yesterday (02/08/2013) but that shouldn't be a problem for this problem.