fb:comments
Hi guys!! Lately I found something more interesting then an ordinary Likes button, something that makes my blog more connected to the other network via facebook open graph it was facebook Comments. The way I implemented facebook comments on my blog, it’s not much different than facebook Likes button. After googling for a while, I found several related sources that describing about facebook comments i.e. here. :D * I feel weird when trying to pointing something with only word, when I usually use my hand :P. Ok, enough talk, lets go to the steps :
- First, we need to create our own facebook application, you can do it here! from there, it will assist you to create your own facebook application.
Type your application name, and choose Agree radiobutton, then click Create Application.
Now, you can customize your application setting, the only things I did in this steps just choosing logo and icon for my facebook application, click Save Changes.
Finish, your application ready to use now. - We need to place an initialization facebook javascript sdk, then you need to set the application id (you can get it from first step)
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'your app id', status: true, cookie: true,xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
- the last thing you need to do, put the <fb:comments/> tag on the place you want on your blog.
This code only works for blog with blogger engine, where attribute xid indicates an unique id for every post I created on my blog.<fb:comments expr:xid='data:post.id' width='400'/>
Yapz!!! finish. Now I have my own facebook comments box on my blog :D
when I posted a comment on it, it will automatically putted on my news feed.Nice and easy, isn’t it? :)



0 comments:
Post a Comment
Post a Comment