Social sharing buttons + CMS?


Is there any way to embed social sharing buttons that have a dynamic link with webflow CMS? I know makes very simple social sharing embed options… but how can I make sure the link getting shared is the one for the current CMS page and not the entire site?


Hello Christopher (@ctrav)

I used code snippets for Facebook, Google+, Twitter, Tumblr, E-mail and Pinterest sharing in one of my clients site. All options were checked and work well.

First of all, I used method that Waldo showed in this post FREEBIE: Sharing is Caring :)

Then I just found and adjust code snippets for Social Networks that I needed


<a class="w-inline-block social-share-btn fb" href="" title="Share on Facebook" target="_blank" onclick="'' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;"></a>


<a class="w-inline-block social-share-btn tw" href="" target="_blank" title="Tweet" onclick="' goes text of your tweet ' + encodeURIComponent(document.title) + ':%20 '  + encodeURIComponent(document.URL)); return false;"></a>


<a class="w-inline-block social-share-btn gplus" href="" target="_blank" title="Share on Google+" onclick="'' + encodeURIComponent(document.URL)); return false;">


<a class="w-inline-block social-share-btn pin" title="Pin it" target="_blank" href='javascript:void((function()%7Bvar%20e=document.createElement(&apos;script&apos;);

With Pinterest sharing, it will take Meta description from the current page and show all images from the site. But it is possible to adjust by changing settings (look Pinterest docs)


<a class="w-inline-block social-share-btn tmb" href="" target="_blank" title="Post to Tumblr" onclick="'' + encodeURIComponent(document.URL) + '&t=' +  encodeURIComponent(document.title)); return false;"></a>


<a class="w-inline-block social-share-btn email" href="mailto:?subject=&body=:%20" target="_blank" title="Email" onclick="'mailto:?subject=' + encodeURIComponent(document.title) + '&body=' +  encodeURIComponent(document.URL)); return false;"></a>

These code snippets will take information from current page meta image and meta description. And, as you know, on the dynamic pages template you can set these settings dynamically too (page settings above the custom code areas).

Classes of anchors may be different (depend on what you will use on 1st step) but “w-inline-block” is necessary.

Hope it helps.


You can see it here and try it.


All of this looks very detailed and helpful! I will try this out when I have a chance and report back if I was successful (which I am sure I will be considering how clear this all in). Thank you so much.

1 Like


Amazing. So helpful.

If you find some time could you take a stab at getting a Linkedin social post share working as well? I messed around with it quite a bit but couldn’t figure out what I’m doing wrong.

Ok, try this one, but I do not have a Linkedin account so really didn’t check.

<a class="w-inline-block social-share-btn linked" href="" target="_blank" title="Share on LinkedIn" onclick="'' + encodeURIComponent(document.URL) + '&title=' +  encodeURIComponent(document.title)); return false;"></a>

Let me know if it works

Cheers :wink:


Hi Sabanna,

Sorry about the delay here - busy. Just wanted to thank you for your time. I’ll check this out sometime soon & report back :wink:

1 Like

Hi, Sabanna. I’m looking something like this but to integrate into the CMS… probably this was answered before, do you know if there is a thread with the answer?

Hello, @portentus!

Check this tutorial:

Hope it helps :slight_smile:


1 Like