A single click on the Like button will 'like' pieces of content on the web and share them on Facebook. You can also display a Share button next to the Like button to let people add a personal message and customize who they share with.
Step-by-Step
1. Go to the Facebook Developers page
2. Pick the URL or Page of a website or Facebook Page you want to use with the like button.
3. Now click on Get Code Button. It pop-up with two list of code example in this image
* Include the JavaScript SDK on your page once, ideally right after the opening tag.
* Place this code wherever you want the plugin to appear on your page.
(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/sdk.js#xfbml=1&version=v2.6"; fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
<div class="fb-like"
data-href="https://solvelogger.blogspot.com"
data-layout="standard" data-action="like"
data-show-faces="true"
data-share="true">
No comments:
Post a Comment