Reputation: 887
I have a simple question about the Facebook "like" button. So I'm building a replica site of hulu.com , and so far it's been a breeze and I never thought that this would be such a hassle. I used the web developer tool provided by Facebook to generate the code, so it should be a simple copy and paste from there. But, no matter how much i edit the source, or rearrange the code, NOTHING WORKS. Please take a look and see what you can come up with as being the culprit to my problems.
P.S. : I've tried it on an entirely new HTML document as well, and still nothing is displayed onto the screen.
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '436365349856529',
xfbml : true,
version : 'v2.2'
});
};
(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/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class = "pull-right">
<p> See what we're watching </p>
</div>
<div
class="fb-like"
data-share="true"
data-width="450"
data-show-faces="true">
</div>
Upvotes: 0
Views: 159
Reputation: 73984
Try on a real server and remove "https":
js.src = "//connect.facebook.net/en_US/sdk.js";
The code looks fine, so i assume you are trying to test it on your PC without any server. Always use a server, you can also start one on your PC (localhost) - or just upload it to a real one.
Upvotes: 1