This blog has moved here: | FOLLOW ME ON TWITTER @yogeshsaroya

Friday, February 24, 2012

How to use facebook comment in website

The Comments Box lets your users comment on your site’s content — whether it’s for a webpage, article, photo or other piece of content. The user can share the comment on Facebook to post to their Wall and in their friends’ streams.
In addition to providing a viral engagement boost to your site, using the Comments Box can also reduce the amount of spam comments on your site. Users will need to be logged into a real Facebook account to comment, and they won’t be able to post anonymous comments. It can makes commenting easy, since many people are probably already logged into Facebook when they arrive at your site.

Now Start :
1. Create Facebook : First Youn need do create facebook app . go and create app for Your website

2. Get commnet Box Code :  go here for comments  code . and get code
Copy and paste this code before </head> tag ... (make sure in all page )

and paste
data-href="" paste Your website name here ...

But in this case You get all same comment in all page because we using in this code ....
Now how to change URL 
just create a function get Current Url of website like

now call this function in data-href="<?php echo $object->getUrl(); ?>" (herer $object is a object of a class )
now your facebook Comment is ready and enjoy it


Post a Comment

Note: Only a member of this blog may post a comment.