Sublime Forum

Facebook Like Buttons



I want to put a facebook like button on my page. So I went to the website and followed all the necessary steps to getting the code for the button. I watched youtube videos to ensure I did it correctly. My facebook page is active, and my facebook app is live.

My code looks like this:

	<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); = id;
		  js.src = "//";
		  fjs.parentNode.insertBefore(js, fjs);
		}(document, 'script', 'facebook-jssdk'));

	<div class="fb-like" data-href="" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>

I am using sublime text 3.

Why wont it show up when I open my code with a webpage?

Thank you very much for your time.




Hey Kyle - this probably isn’t the best forum for this.


It’s because you are developing locally and the facebook buttons require you to have some sort of server running for the JS to load. An easy fix for this is to change

js.src = "//


js.src = "

1 Like