This is my quick tutorial on how to add like button to your blog. I will present you the whole procedure in several steps.
To add like button to your blog, you will have to do this steps:
1.Go to this link: http://developers.facebook.com/docs/reference/plugins/like/
- add data for your blog's post url (the post where you want to add Facebook like button), for example: http://trajcevskifilip.blogspot.com/. This is the most important thing that you have to do in order to get your facebook button code.
2.Click on the Get code button
- The application will give you two codes: JavascriptSDK code and a code for your plugin.
- The JavascriptSDK code looks like this:
<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>
- Copy this code.
3.Go to your blog and create a new blog post.
- Enter in the Edit HTML mode.
- Paste the code you have copied on the bottom of your post.
- This code needs to be copied only once so you don't have to include the JavascriptSDK code for every post where you want to add Facebook like button.
Imortant: If you have created Facebook like button for your blog before, you don't need to go trough the steps: 2 and 3, you need only step 1 and the next steps:
4.Return to http://developers.facebook.com/docs/reference/plugins/like/ page and copy the plugin code that you have created.
- It should look like this:
<div class="fb-like" data-href="http://trajcevskifilip.blogspot.com" data-send="true" data-width="450" data-show-faces="true" data-colorscheme="dark"></div>
5. Go to the post where you want to add Facebook like button.
- Open the post's edit mode.
- Click on Edit HTML button, so you will enter the HTML mode.
- On the end of the post paste the code that you have copyed
No comments:
Post a Comment