Twitist Forums
how to make a facebook share/like button? - Printable Version

+- Twitist Forums (http://twitist.com)
+-- Forum: Facebook forums (/forum-14.html)
+--- Forum: Facebook Pages (/forum-13.html)
+--- Thread: how to make a facebook share/like button? (/thread-126082.html)



how to make a facebook share/like button? - Kote - 04-08-2014 04:09 AM

Hello, I want to make a facebook share button for each post of my website. please help


- Leo D - 04-08-2014 04:15 AM

I'm pretty sure that facebook provides a tool for making each Smile
https://developers.facebook.com/docs/plugins/share-button/
https://developers.facebook.com/docs/plugins/like-button/


- Bruce - 04-08-2014 04:15 AM

You can do this in less a minute.

1. Add the following javascript after <body> tag in 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/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

2. Add the following line to where you want to the like/share button to be:
<div class="fb-like" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>