Streaming live at 10am (PST)

How to add FB social share icon?


#1

How to add social share icon?

When i embeded this code (with the embed block) i get JS errors
https://developers.facebook.com/docs/plugins/share-button#configurator


#2

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); js.id = id;
  js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.10";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

And this code in an embeded

<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&amp;src=sdkpreparse">Partager</a></div>

Hope this helps


#3

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