iirebekah Posted June 22, 2017 Share Posted June 22, 2017 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? Link to comment
mjouhet Posted June 23, 2017 Share Posted June 23, 2017 The facebook for developers site makes it extremely easy. here is the info:Step-by-Step Choose URL or PageChoose the URL of a website you want to use with the comments plugin. 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. 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 Link to comment
iirebekah Posted June 23, 2017 Author Share Posted June 23, 2017 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. Link to comment
kerstinmartin Posted July 29, 2017 Share Posted July 29, 2017 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? Hello, I'm Kerstin! Circle Leader and Squarespace Authorized Trainer since 2016. I am passionate about teaching all things Squarespace with a focus on the art of gentle growth and calm marketing. 🎉 New course! Host your online course on Squarespace with the new Courses feature. 👩🏼💻 Curious about my 2024 pivot? Sign up to my Studio Notes for glimpses behind the scenes. Link to comment
iirebekah Posted July 31, 2017 Author Share Posted July 31, 2017 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. Link to comment
vladcampos Posted August 14, 2017 Share Posted August 14, 2017 And what's the code that will add the permalink? Link to comment
omarimc Posted August 20, 2017 Share Posted August 20, 2017 @iirebekah we created a plugin to solve these issues. https://sqspthemes.com/plugin-shop/facebook-comments-squarespace-blog Customize and optimize your Squarespace with SqspThemes.com Link to comment
christianschichtel Posted January 31, 2018 Share Posted January 31, 2018 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> Link to comment
Guest Posted November 26, 2018 Share Posted November 26, 2018 Thank You! This worked out perfectly! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.