Søk i hjelpesidene:

Facebook comments on page level

This code example shows how to implement a seperate Facebook Comments section for each of your pages.

Code example

First check that the Faceook Kit's "Enable Facebook comments" option doesn't solve your needs. 
<div class="fb-comments" data-href="" data-num-posts="50" data-width="750"></div>
<script type="text/javascript">$(".fb-comments").attr("data-href", document.location);</script>

<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>

Add this code to for example:

Be sure to add this code with the "Edit HTML Source" button. Otherwise the code will just be displayed as text in your page.

  • A HTML part or DIV element in your design template(s)
  • To one or more of your HTML# templates (Example: Your display template for articles and/or products)
  • Header or footer text - In a folder or inside an article (must be added in view source mode!)

Where not to add this code:

  • Meta headers