Facebook Like Button / Recommend Button / Send Button

Facebook Like Button
Cara untuk memasang tombol like/recommend dan send facebook pada web adalah seperti berikut:
Pada web biasa bisa langsung menggunakan script yang ada pada Like Button
Tetapi untuk pengguna blogger, ada beberapa hal yang harus diperhatikan.
Copy ini pada template blogger setelah <body>
<div id="fb-root"></div>
<script>window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID', // App ID
channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Source
YOUR_APP_ID bisa dikosongkan
Kemudian copy ini pada bagian tempat yang akan ditampilkan tombol like facebook.
Contoh: diantara <header> dan </header>
<div data-send="true" data-width="450" data-show-faces="true"></div>
Facebook Comments
Leave a Reply