Streaming live at 10am (PST)

How to add FB social share icon?

How to add social share icon?

When i embeded this code (with the embed block) i get JS errors

Hey @Siton_Systems,

Put this code in the head of your page

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

And this code in an embeded

<div class="fb-share-button" data-href="" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href=";src=sdkpreparse">Partager</a></div>

Hope this helps

1 Like

Thanks. I hope in the future Webflow will add Share block beacuse “by code” sometimes the FB could change.

1 Like

Thanks that works, but I suggest to make the code for the embed like this (if used inside the cms template):
(in this case and after using your cms page address you will have a facebook white icon as SVG image in size 22 px/ size can be adjusted in the code also)

<div class="fb-share-button" data-href=" cms template address/YOUR SLUG (added from add field in the code window" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="222" target="_blank" href=" cms template address/YOUR SLUG (added from add field in the code window"><img src="" title="Share on facebook" width="22"height="22" /></a></a></div>



  1. Choose URL or Page. Pick the URL of a website or Facebook Page you want to share .
  2. Code Configuration. Paste the URL to the Code Configuration and adjust the layout of your share button. …
  3. Copy & Paste HTML snippet. Copy and past the snippet into the HTML of the destination website.