Facebook Comments

To use Facebook comments with your publication, follow the steps below:

  1. Go to the Facebook Developers Comment plugin
  2. Copy & paste a post URL into the URL to comment on field
  3. Next, set a width for the comments to display
  4. Click the Get Code button to generate the Facebook Comments embed code
  5. Find the default.hbs file located in your current theme’s directory, e.g. content/themes/your-theme/default.hbs
  6. Copy and paste the JavaScript SDK below after the opening <body> tag on the default.hbs.

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

  7. Find the post.hbs file located in your current theme’s directory, e.g. content/themes/your-theme/post.hbs
  8. Copy and paste the edited code snippet below to display the Facebook comments,

    <div class="fb-comments" data-href="{{@blog.url}}{{url}}" data-numposts="5"></div>

  9. Save the post.hbs file and re-upload your theme to your publication