Jump to content

Facebook: How do I embed a Facebook feed into a page?

Recommended Posts

Facebook supplies me with 2 code chunks. It says the first should be ideally after the opening body tag:


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

and the second should be wherever I want the plugin:


<div class="fb-page" data-href="https://www.facebook.com/la-pompe-jazz" data-tabs="timeline" data-width="500" data-height="700" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/la-pompe-jazz"><a href="https://www.facebook.com/la-pompe-jazz">La Pompe Jazz</a></blockquote></div></div>

I put the latter chunk in a "code block" on my page.

This doesn't work no matter if I put the first chunk in the "code block" with the latter, nor if I embed that code in the header.

Does anyone know how to actually get this plugin to work?

Link to comment
  • Replies -1
  • Views 33.4k
  • Created
  • Last Reply

HiI followed your description above and it worked perfectly for me - which is great because it's something I wanted to be able to do!

Here's what I did. I pasted the first code chunk using the per-page code injection (click the gear icon beside the page name, the click Advanced)

alt text

Save this, then add a code block to the same page, and paste the second section of code like this:

alt text

Click Save to save the code block then Save again to save the page.

You may have to refresh the page or exit the edit mode (click arrow in top left corner of page) to make the Facebook data to appear.

Paul

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

I doubt it is the template. Can you provide a link to the page?

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 2 months later...

Do this:https://developers.facebook.com/products/social-pluginsthere you will find anything you need. From like buttons to a complete Page feed. The developer page is buggy with adblockers installed so beware.Complete FB feed:https://developers.facebook.com/docs/plugins/page-plugin

Press: Get code. Paste first part of the code in advanced part of main page! Not the page where you want the feed to show.

Go to page where you want the page. Add an "embed" block. Not a code block!On the "embed" pop-up click the </> sign and paste the 2nd part of the code. "apply" and save the page and voila!

Link to comment
  • 5 months later...
  • 1 month later...

The Facebook widget creates an iframe which does not look good.

Due to lack of a good solution, I created a 100% free plugin called Famax that can be used embed all kinds of Facebook pages beautifully. Here is a small demo - http://demos.codehandling.com/famaxdemo3/famaxliveedit.html

Feel free to use this on your personal or any websites :)

Link to comment
  • 4 weeks later...
  • 3 months later...
  • 1 month later...
  • 5 months later...
  • 1 year later...

Archived

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

Guest
This topic is now 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.