14
2011[Facebook Comments Box] Add Facebook Comments Box Social Plugin Widget on your website in 2 Steps
Tags: Facebook Social PluginsI started getting following XID error message in my Facebook Comments Box Social Plugin which I had integrated on one of my website some time back.
“The comments plugin requires an application id to properly namespace the provided xid.”
Reason for this error is that Facebook has again updated its Social Plugins and although I have already posted on this, the procedure for integrating Comments Box Social Plugin in your website has changed now.
Comments Box is a social plugin that enables user commenting on your site. Features include moderation tools and distribution.
Here’s the new process to add Facebook Comments Box on your website in two easy steps.
Step 1
Go to http://developers.facebook.com/docs/reference/plugins/comments/ and provide the URL to comment on, you need to provide your website domain name here or in case your web page is a static one, please provide full url to the article page.
Also provide Number of posts to display by default
Also provide Width, and hit the Get Code button.
Copy the generated code which should be soemthing like this:
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=xxxxxxxxxxxx&xfbml=1"></script><fb:comments href="http://www.website.com/" num_posts="2" width="600"></fb:comments>
Step 2
Just go ahead and place the code inside your website. If you have a bigger dynamic website, you can easily generate your existing article page link dynamically using the url of the web page in php or any other server-side language. For a php website, you can use following code snippet:
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=xxxxxxxxxxxx&xfbml=1"></script><fb:comments href="http://www.website.com/<?=$_SERVER['REQUEST_URI']?>" num_posts="2" width="600"></fb:comments>
Now place this code inside your website where you want the comments widget to appear. Make sure you place this snippet in a php page and not an html.
That’s it.
Adding Administrator(s) for Comments Moderation
Admins can choose to make the default for new comments entered either “visible to everyone” or “has limited visibility” on the site (i.e., the comment is only visible to the commenter and their friends), to help mitigate irrelevant content.
Admins can also blacklist words and ban users. If a new comment is published from a banned user or contains a blacklisted word, this comment will automatically have limited visibility.
To moderate, you need to list yourself as an admin. To do this, simply include open graph meta tags on the URL specified as the href parameter of the plugin. Include:
<meta property="fb:admins" content="{YOUR_FACEBOOK_USER_ID}"/>If your site has many comments boxes, you should specify a Facebook app id as the administrator (all administrators of the app will be able to moderate comments). Doing this enables a moderator interface on Facebook where comments from all plugins administered by your app id can be easily moderated together.
<meta property="fb:app_id" content="{YOUR_APPLICATION_ID}">Hope that Helps.
Cheers!
Related posts:
- How to add Facebook Comments Box widget on your website in 3 steps
- How to add Facebook Like Box widget on your website in 2 steps
- [Facebook] Resolve Thumbnail Image Preview Issue while Sharing Article on Facebook
- Automatic Subscription for New Topic or Posting Comment to Get Email Notifications in Mingle Forum WordPress Plugin
- Text Slider for Testimonials with Navigation – JavaScript Widget using jQuery Cycle Plugin
dizi izle
Thank you nice this post.
alice
Thank you for this nice article!
Ej Duran
Wow i dont know how i found your post after 8 hours of searching for a solution to my problem i finally came across your article. THANK YOU THANK YOU!
John
I don’t understand where I would put this code:
I understand you said this:
To moderate, you need to list yourself as an admin. To do this, simply include open graph meta tags on the URL specified as the href parameter of the plugin. Include:
But, I put it inside the code, right outside, etc. It never worked.
Help?
Ludwig Van Fern
You need to put the Open Graph Meta tags on the HEAD section of your page.
m0nark
i have also a problem same as johnZ problem . . .
I don’t understand where I would put this code: I understand you said this: To moderate, you need to list
yourself as an admin. To do this, simply include open graph meta tags on the URL specified
as the href parameter of the plugin. Include: But, I put it inside the code, right
outside, etc. It never worked.
Help?
m0nark
and open graph meta tag?
Branch Whitney
Thanks. I have been looking for this. I don’t know why Google Blogger does not make this information available.
samir
Heloo..Your link is kind of good,but i have some problem with it, when i added this to the php file, the comment thing is going beyond the area of the template. How to sort this out..??
Ali Qureshi
You can change the height and width of the Facebook Comments Box widget easily.
ubrushes
Thanks for this great step by step procedure.Now finally i added FB comments on my site
mursallo
Hello Iam trying to add admin in my website facebook plugin comment page. But when I paste this code in my header section as meta tag
I can’t see the whole comment section do I have to put something else in body or this is the only code I have to paste in the head …any help plz Thanks
Mursallo
Felix
how can i make comment box like your one?
Ali Qureshi
Do you need Blog comments or Facebook comments? I have not added Facebook comments box here.
Felix
If your one is the blog comment, so need but not others
Ali Qureshi
My blog is powered by WordPress. You can download and install it. and you will get this commenting and tons of other features.
Andrew
This method works but it requires creating unique code for EVERY single page of your wesbite.
Is there a way of creating the code so that the page name (e.g. example.html) dynamically appears within it?
Najam
Ali, the question you haven’t addressed here is that how open graph meta tags are made and placed on head section.
I have been trying to integrate this comment addon on my website since past 24hrs, it gets integrated easily and works well. The problem comes about deletion of comments (although i’m prototyping rt. now).
Following link shows no recent comments. I’m getting website insights on facebook (means its successfully integrated)
https://developers.facebook.com/tools/comments
Any help would be greatly appreciated!
Ali Qureshi
Facebook is very volatile and their scripts stop working for one reason or another. You never know when would they stop working. When I posted this, it used to work.