blog posts - For me this code works fine (By embed html)
** remember to declare og:image
, title
, description
(Read her)
option 1
Change the img src to your icon path
<a title="share on facebook" class="social-icon facebook" href="javascript:fbshareCurrentPage()" target="_blank">
<img height="21" src="https:/facebook-icon.gif" alt="share on facebook button">
</a>
<script language="javascript">
function fbshareCurrentPage()
{window.open("https://www.facebook.com/sharer/sharer.php?u="+escape(window.location.href)+"&t="+document.title, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false; }
</script>
option 2
(Official button style) - copy paste the code from her:
Option 3:
<a class="w-inline-block social-share-btn fb" href="https://www.facebook.com/sharer/sharer.php?u=&t=" title="Share on Facebook" target="_blank" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;"></a>
For cms items -
inside encodeURIComponent
-
write the base url
(Your domain) +
collection url
& slug
:
<a title="Share on Twitter" href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false">Tweet</a>
<script src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
twitter-share-button
class will give you this design/style:
Or remove this class and use any image/text you want inside the button.
Share by EMAIL
For all windows users - click will open Outlook = nightmare.
Anyway share in this case is “regular” email (Title/subject). Try this:
Related: