Jump to content

How Do I Add facebook comments to my blog?

Recommended Posts

Posted

Hi,

I am trying to add facebook commenting to my blog. I was able to get the code and add it to individual posts. but is there a way to do it so that it automatically adds it to new posts without me having to take each individual blog URL and make a new code?

  • Replies 8
  • Views 8.2k
  • Created
  • Last Reply
Posted

The facebook for developers site makes it extremely easy. here is the info:Step-by-Step

  1. Choose URL or PageChoose the URL of a website you want to use with the comments plugin.

  2. Code ConfiguratorCopy and paste the URL into the code configurator below. You can adjust settings like the width of your comments plugin or how many posts you want to show by default (num_posts). Click the Get Code button to generate your comments plugin code.

  3. Copy and Paste code snippetCopy and paste the code snippet into the HTML of the website or webpage where you want to implement comments.

https://developers.facebook.com/docs/plugins/comments/#configurator

Posted

Yes, I'm aware of that. If you read the question I already said I got that part. The issue is in order for it to work, you have to paste "step 3" as shown in the photo into the actual blog post with the unique blog post URL. in other words you have to complete all 3 steps every single time you make a new blog post. I'm asking if there is a way to make sure it automatically fills in the URL for the new blog so you don't have to do this every single time you want to post something. alt text

capture.png.20fb586a3be58751af03700d06948d10.png

  • 1 month later...
Posted

I would still love an answer to this as well!! Can the code be put into the page blog post injection and be auto-generated for EACH post individually?

 

CalmBusinessLogoTitleSimple.png.3067db0e3c08baf2e967872eaa6f9182.png

Hi, I'm Kerstin! I offer business and marketing courses to help solopreneurs deepen their business skills and grow their confidence, audience, and revenue - without the hustle.

👩🏼‍💻 Is solo entrepreneurship right for you?  Take the quiz

Posted

So i figured it out with much googling and trial and error. So when you get the codes from facebook. The first one (step 2) goes on your "blog header" the second one goes in the blog item box (step 3). The key is to add code so that it automatically fill in the indivual blog post URL. In order do do that you need to add

"permalink" will automatically fill in the blog post URL. The only downside is that this will make the comment boxes show on your blog homepage in addition to the individual post. There's a way to hide them but I forget how. You could probably find it on google.

  • 2 weeks later...
  • 5 months later...
Posted

I figured out where permalink should go! I have no idea what I'm doing with code, but by placing permalink in different spots…I found that this worked!

Under PAGE HEADER CODE INJECTION:


<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 = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.11';
 fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


…and under POST BLOG ITEM CODE INJECTION


<div class="fb-comments" data-href="http://whoaneat.com/blog{website.baseUrl}{permalink}" data-width="980" data-numposts="5"></div>




  • 9 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.