I've decided to try and utilize
Facebook Comments Plugin for my
travel blog application (ASP.Net). At first glance it seemed like a job for 5 minutes, however it proved to be quite a tricky experience. I had following
requirements:
- need to be able to display multiple comments sections per page (since I have 10 blog-posts on each page and each post needs to have its own comments) that need to be distinguishable by querystring parameters
- need to have a way of calculating how many comments there are for each post
- would love to have a way of being able to get latest X comments across all the whole site (i.e. irregardless which blog-post they belong to)
To
get started, follow
this tutorial (post #11). In essence, you need to set up Facebook Application using following steps:
1. Go to:
http://www.facebook.com/developers
2. Click on the
+ Set Up New App button (at the top right of the page)
3. Type your
App Name (example: Mysite-Name Comments) > select
Agree > click on
Create App
4. Go to the
Web Site tab (on the left tabs-list)
5. Enter your site url with an ending slash in
Site URL, (for example: http://example.com/)
Enter your site domain without
http://www. in
Site Domain, (for example: example.com)
and click on
Save Changes
6. You will see your
Application ID number (above your app API Key & App Secret)
7. It will take between 2 to 20 minutes until it will be ready to use with.
Use
this page to see the list of your applications.
Now that you have you aplication set up and you have the application ID, it's time to set up the
security settings. Comments left on for your application can
be moderated here - and here using the
Settings link you can also adjust the security settings.
Final step is to
generate the required code for your page. Use the
Comments Tool for that. The top part with generated script is NOT COMPLETE! You do need to register the
Javascript SDK - I recommend using the script on that page instead of the one from comment tool (in step 1). Step 2 gives you the DIV element which contains the comments box itself - works like a charm and yes, you can use href with different querystrings.
There are couple of new features that you can read about in
this blog post.
You are very close to being done, however there are
couple more settings that you should add to your page's header tag. Details are described n the
Open Graph Protocol documentation in the Getting Started section. Finally you should add following tag:
meta property="fb:app_id" content="YOUR-APP-ID"
That will ensure that your moderators will be able to do in-place moderating (i.e. the plugin shows them the "moderate" option)
Use
Facebook Debugger to see what settings your page uses and if there's anything that needs your attention.