How to Add Facebook Social Comment Box on any Website or WordPress

Facebook Social Plugins
are a set of plugins that enables social interactions on your website. Not to mention the huge user base Facebook has developed along the time. Previously, it was a pretty much a hassle to go through the Facebook connect implementation for a website. Now with Facebook Social Plugins things are much more simpler to implement and use. Lets take a look how easily we can implement a Facebook Social Comment box for virtually any website that allows HTML and Javascript.

Here are the steps:

  1. Create a Facebook Application for your website. This step is required and all the fields must be filled up.

    Site name : Your Site Name
    Site URL:
    Locale: English (or your preferred language)
  2. Now you need to fill up a Captcha to confirm creation of the Facebook Application for your site.
  3. Once you click Submit on step 2, you would be able to see the confirmation page with your Application ID and Application Secret. You can modify your existing Applications at My Apps page.
  4. Now go  to Facebook Social Comments site. Fill up the URL where you want to put your comment box to. Enter the number of Default comments to be shown and finally enter the width of the comments box.

    NOTE: The URL can be a single HTML or Dynamic page too (eg.
  5. Once you are done with step 4, you can click the Get Code button to get/copy the necessary codes for your site.
    facebook comments code
  6. Create a empty HTML file on your website (eg. index.html). Then paste the code in between <body> and </body> section of the HTML file. Save the file and upload to your server.

    NOTE: Your Website APP ID is pasted inside the meta property for facebook underneath the <head> tags.
  7. Open the file you have just created using your browser, you should be able to start posting comments on that page. Yes that’s about it.



I must also say this is just a simple implementation of Facebook Social Comment at your website. There might be more options available for you to implement if you go through the documentation.



How to Implement the Comments Box on WordPress:

  1. Follow the Procedures mentioned on the previous steps and after then
  2. Look for the file comments.php inside your themes folder (the name of the theme depends on which WordPress theme you are using)
  3. Open and edit the file using a text editor. Modify the code you have found on the previous implementation (Which is for using it on a standard website) as below.

    NOTE: You need to change the part href=”<?php echo get_permalink($post->ID); ?>”
  4. Paste the code into upper part of your comments.php file. Save and Upload it back to your server.
  5. You should be able to see the Facebook Dynamic Comments for all your WordPress posts.


Where do you manage/moderate and administer your comments?


Do not post Test comments on this post because it confuses other people who are reading this post.

Eventually your test comments will be blocked and Banned.

Test it on your own site. Thanks.

This article is an upgrade of the previous Facebook Connect Comment Box article for your website.

301 Comments How to Add Facebook Social Comment Box on any Website or WordPress

  1. rdev

    very useful thank you. i did all the steps but my comments from my website doesn’t go to my facebook page and reverse, what am i missing?

  2. Victor Manuel Barona Guzman

    Hi, I can’t make it works :(

    Please helpme… I follow the steps but nothing happens…
    The Comment box doesn’t appear

  3. Michele Grasso

    Thank you for your post, I find that if I want to have the plugin on multiple posts on the same html page that the comments repeat.  How do I avoid this? I would like the users to have a new forum for comments and not include comments from prior blog posts. Thank you

  4. Guaranteed Seo Services

    this is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!

  5. Website design

    However, things have changed now. With the increasing popularity of using websites around the world, businessmen are targeting websites for the advertisement of their products. It is comparatively much cheaper as well as highly effective.

  6. Wendie Lee

     recently found this site using yahoo. com And i want to thank you for work. You have done really excellent site. Great work, great site! Thank you!

  7. Lorrinelle

    Hi  I followed all the instructions from facebook developer and some other sites but for some reason when I press ctrl and f in the same time then i pres body> tag but I don’t seem to find it, can somebody please help me I’ll appreciate it so much. thanks :(

  8. Home Theater Installation

    Thanks for posting
    Really Such Things. I should recommend your site to my friends. Cheers.

    1. Curtis Carlson

      testing discuss. I might hook this up on the WP theme I am coding. Don’t know about FB commenting as moderation might be a pain in the you-know-what.

    1. online slots

      Thanks a lot for
      sharing such nice information to me and my friend also.I am very much
      satisfied by this website.

  9. Nitesh

    hey people like do as well find twitter & facebook comment box.. as well in my group one of my friend tell me that why dont you put twitter & facebook comment box in my blog..
    this is latest trend but with as well DISQUS is also popular…

  10. סאמר סקול

    Just stumbled across this and I’m SO glad I did! Thanks for the great info.
    There aren’t a lot of good sources like this. I can see that you are an expert in this area.

    1. nfl and nike jerseys

      Right now on time the most significant videos to kick or punch the box clinic is usually lord on the extra plus the with regards to it video is, may two to three aspect continued on the video. So what on earth will happen is may perhaps is very a large number of tshirts which usually are part of typically the movie channels, to start with tshirts while using particular personas relating to. Subsequently you can get tshirts which use only penning about the tshirts similar to ‘frodo’ or maybe ‘gandolf’ or maybe the the majority given text from the show is usually ‘precious’. And so every single one of are just a few of typically the regions which unfortunately men and women use on tee shirts, which ever t shirt billet or maybe envision people feel more comfortable throughout.

  11. custom t-shirt

    It provides a lot of
    information, which is great merit in this site.

    Many thanks for a good exchange of information in this blog.

  12. Abdul Rehman Khan

    How can i modify my comment box like yours. I want a comment box for all (facebook, twitte, google, yahoo)
    tell me tell me.


  13. Oscar Tignach

    Jump to Embed Facebook Comments Box In Your WordPress Weblog‎: Facebookfeatures a social plugin called Comments which allow you to add Facebook comment box to your WordPress website.

  14. Trip Itaka

    So this layout is what i want to avoid on my blog! You have a wordpress comment box showing comments, a facebook comment box with its own set of comments then 2 different like buttons showing 2 different numbers.

    I’d like to consolidate. I’d like all facebook and wordpress comments to be grouped together and appear seamless. All comments seen on WP styled as dictated by my theme, these same commentsm also seen in facebook. So all facebook comments added to the WP database and all comments in the WP database exported to facebook.

    Has this been done? If so can someone show be a blog where this happens? thanks

  15. anonymous

    they can hear and see what your visually thinking

    the reason alot of asians have completely expressionless faces, only associate with asians and dont associate with non asians very much is to avoid accidentally revealing that they can read read minds, if all over a billion asians were to show facial expressions all the time just as much as non asians, associate with non asians much more, and be much more friendly and talkative, then alot of them might accidentally reveal that they can read minds by accidentally showing a facial expression or dirty look when someone thinks, or visually pictures something in their mind they dont like or find astonishing or funny, and if they were all to associate with non asians alot more there would be alot more people around for them to accidentally show facial expressions when those other people think things they dont like, so they only associate with asians so there wont be anyone around for them to see that and have any accidents happen in the first place

    think about it, its not normal how alot of them act, and the entire way they act is all to hide their mind reading abilities, it makes perfect sense to do all of that to hide that they can read minds, because all of that is the perfect way to do it!
    every single asian on the planet is hiding their mind reading abilities, they value hiding their mind reading abilities more then their own lives!
    thats why nobody knows about it!

    try thinking, best yet visually picturing in your mind something something absolutely crazy as you possibly can when you are around asians, and try looking for asians who give people particular looks, especially dirty looks for what appears to be for completely no reason, that is them giving people looks when they hear and visually see someone thinking something they dont like, find funny or astonishing
    it still happens despite a large number of them having completely expressionless faces all the time, it would just happen alot more if none of them had completely expressionless faces all the time, its not uncommon!

    i know this sounds crazy, impossible, and completely unbelievable, BUT IT ISNT CRAZY WHEN ITS TRUE

    you have to spread the message!!!
    the world has to know about this!!!!

    1. Ruhani Rabin

      Please read the previous comments before making a question.. you can manage your comments here

  16. Ac Merida

    can you PLEASE explain how to list as an administrator of the comments(with pictures of the process)…… im having so many issues it never works

  17. rafiqul awal

    how to remove user thumbnail / profile pic face from the comment box…………..i just want the comment box not user thumbnail……plzzz suggest or give a the code………….thanks

  18. Withkanddoubles

    Thank you very much for writing your post! Nonetheless, I got a question for you. People in the US  seem to see the box, but people who have their language set to Spanish or actually if their Facebbok was created in Mexico, can’t see it. Is there any way we can fix this? I was thinking creating two comment boxes? one for each? What do you think? Would this work? Thank you before hand! =) 


    1. Ruhani Rabin

       Hi There, I am not exactly sure how that will work out but you are always welcome to do some experiment .. DO let me know how it worked out!

      1. itzco

        Not really sure why it wouldn’t show, but have you tried just changing the language code? If you’re using PHP or any other server language replace the en_US for the language code for spanish probably es_MX (I do between Thai and English)

  19. santa

    Thanks.. Is there a way to specify the href of fb:comment on run time/ dynamically ?

  20. Hébergement Web

    Thanks for taking time out to write this very detailed article. The plugin can help more people to install the comments, because it is easy. They each definitely have a purpose.

  21. Kenmehoo Comakin

    i am unable to create a new tab on my facebook tab this may be due to facebook changes from fbml to iframes perhaps. I have everying ready just can;t insert it yet

  22. Jaspervalle

    Where will i get the Site URL??sorry i’m too confused.
    coz everytime i paste the url to the “URL TO COMMENT ON”it doesn’t have the app please..

  23. mannu singh

    i have some problem to add face book comment box to my site

    when i comment on this page picture are not sent on my facebook id
    please help

  24. Gagandeep Singh

    Thanks for the help. I have one another problem and looking for solution for the same. I have my website where i have more than 150 pictures with each picture having its own static page. Now how i can add comment box to each page. Right now i have tried to add the same code on all the pages and when i comment on one picture the same comment is posted on all the pages.

    Any help

    1. Ruhani Rabin

      I didn’t see the code anywhere in your site.. also you have other ajax
      script which might conflict with the FB codes.. try DEBUG using firebug or

  25. Peter

    Thanx for this article. I recently started to use the box comments for my website and it really works well. Thanx. Peter

  26. woody

    How can I create more different comment boxes? If I add two comment boxes this way, one comment will show up in both comment boxes

  27. Peter Petrelli

    As far as I can see the first step (create FB App) is not truly required. I only want to integrate the CommentBox on one Page and can’t see any reason to create an App for it?

  28. M. Emre Yayman

    How can we do it on dynamically generated pages like “ ” ?
    The comments are same on all pages now. Can it be different on each page?

  29. business valuation

    I am glad that now I can add facebook social comment box on my website thanks to your instructive tutorial. It is a very useful post for every one who wants to add this feature to his websites.

  30. nhile

    Great tutorial, some question, based on number 6 do I really need to create a blank html page for this to work? or I can only used my index.php,header.php or in page file in wordpress,by the way my site powered by wordpress.

    1. Ruhani Rabin

      Hi you don’t really need a blank HTML file, i could go anywhere where HTML is supported.. For WordPress you might need to do coding to resolve your dynamic URL inside the tag ( example fb:comments href=”ID)); ?>” ) you get the idea..

  31. Amir Mishani

    Hey bro how do you customize the style on the new comments plugin, on the old one you could insert a CSS style sheet and figure out the IDs and give them your own styling but it doesn’t seem to work on the new comments plugin.

  32. Nonee

    ارجوكم ياجماعه ساعدوني عندي ظروف صعبه جدا والدي مشلول وانا بشتغل وبصرف علي البيت بس مش عارفين نعيش وانا مش عارفه اعمل ايه؟؟ اللي عايز يساعدني يحولي اي حاجه علي الرقم دا 0191778367 وانا ببيع الرصيد لاي سنترال ارجوكم ساعدوني وربنا يجزيكم كل خير

  33. Kapansenget

    hi ruhani..gone thru all those steps but failed at step 6 and 7..
    if i’m a blogger and hosted ad blogspot[dot]com. ,how to made the html files on HTML code?
    i had pasted things in step 5 but it does not visible in my blog..

    1. Ruhani Rabin

      Each url has it’s admin link.. you can either find it on myapps or you can find the link at the comment page itself .. (if your FB id is the owner)

  34. thesis writing

    why do people do this? seriously? is that because they think that everybody has a facebook account ? what if not? cause in reality it is not! i think it is wrong decision to put those boxes everywhere!

    1. Vin

      Actually, the Comments Box even lets users without a Facebook account comment. But it’s helpful because for the 600 million people who do have Facebook accounts and spend more time there than any other site, links to your web site get posted to their newsfeeds. It drives traffic and helps their friends discover the site.

    2. Ruhani Rabin

      Facebook social comments box allows adding comments system to a static website without knowing of any dynamic coding.. just as simple as copy paste..

  35. Kiralylorand

    i have a question, how can i put different comment box in different page, an comment box for every game from my site and to be able to see the insights? please help me, can you explain me on my mail please?

      1. dbc

        Actually this is not really true, as you see in the picture at step 5 you have “a href” in where you can change the url yourself into a dynamic code, depending on what coding or cms you use you can put in code to retrieve current url and echo it into the href tag.

      2. dbc

        Actually this is not really true, as you see in the picture at step 5 you have “a href” in where you can change the url yourself into a dynamic code, depending on what coding or cms you use you can put in code to retrieve current url and echo it into the href tag.

  36. Anonymous

    Hi Ruhani
    I have heard that it should be possible to allow anonymous comments in the new Facebook Social Comments module. Do you know if this is true? And if true – how do you set it up?
    Thank you for a great wizard.

  37. prank call

    It is fact that Facebook is world famous social networking site.Facebook Social Plugins are a set of plugins that enables social interactions on your website. Its very easy to add from facebook and get more advantage.


    It is fact that Facebook is world famous social networking site.Facebook Social Plugins are a set of plugins that enables social interactions on your website. Its very easy to add from facebook and get more advantage.

  39. Kirkshoe

    Question (after explanation)

    I registered an App (website) with Facebook so that I could install a Facebook Comments box to that website. My root index.htm is a split frames page with the website navigation menu page topframe.htm static in the top frame. I installed a Facebook Comments Box in the page that loads in the bottom frame – bottomframe.htm. When a User posts a comment that also posts to their facebook page, the Link is for bottomframe.htm and not the index.htm page with the Menu that I want people to link to. I have been unable to find an answer on Facebook.

    Can someone here instruct me on how to set up my Facebook Connect “app” so that the Posted link refers to index.htm and not bottomframe.htm?

    1. Vin

      Go into your developer settings for the app, and find “Site URL” – that should be the URL you want your app to link to.

      Check the href field in your fb:comments tag on your page. That should be the url you want comments to link back to.

      You might need to set up a way to dynamically load content in the bottomframe.htm depending on some extra querystring in the URL for index.htm, if you’re not able to pull off what you were trying to do.

  40. Lukasz Lawreszuk

    Hi, im trying to add facebook comments on static html page and I have tried so many codes and cant make it work… do you know if it’s possible to add facebook comments on static html page?

    1. Vin

      For that you need to implement other elements of Facebook. Look at the other Facebook Social Plugins on their site to see what’s helpful for you. There are many different ways to implement it. Regardless of whether or not people register with your site using Facebook, the comments box works the same way.

  41. Admin

    How do we integrate this into a membership website so they can click connect and it will get their facebook info and register them.


  42. longines sunglasses

    I just came by your blog and wanted to say that I’ve really liked browsing your blog posts.<a href=””>longines sunglasses</a>

  43. Sartajbedi

    I registered myself with facebook developer but where is the xd file. the screen shots are not the same. Please advise.

  44. George

    Strange, I don’t get to the 2nd page as described here ! after the captcha I see a whole other story !!

  45. Annie Mueller

    Thanks for this – took me an hour of searching thru FB apps/WP plugins to realize they weren’t exactly as custom as I needed… this is the exact information I was looking for. Appreciate it.
    Annie Mueller

  46. Victoria Whitehead

    I have been trying to create an application for the past few days now and have been unable to get through security. It keeps saying that I typed the Captcha words incorrectly, but I know they are correct. Has anyone else experiencing this issue, and any news on when it will be fixed. I am in Spain…maybe the developers wizard is only open in certain countries at the moment? Thanks

  47. Casey

    What about adding the comment box on your FB tabs. Do you need to create and application for this?

  48. John Berger

    Is there a way to get the comments box working with an iWeb page? My problem is twofold: I'm not sure there is a way to upload the xd_receiver.htm file to my iWeb page, and then I'm not sure if you can adjust HTML code in iWeb. There is an HTML snippet widget, do you think that would work? Thanks for any help!

  49. livereceptions

    I doing seo job, backlink is the most important for seo, one week I added 600 backlinks,it is lots of job, I did it manually, how othere people do it?

  50. Skt2009

    r we talkin about the same facebook geesh…eithr this is outdated or i cant speak or understand the english language

  51. Amir sayani

    my issue is: facebook is not showing all comments at same time, it shows sometime 2 sometime 3, and so on, i wanna see at same time.. please help

  52. Darius

    I have simple html blog and Im trying to use this option (comment box) but all i get is loading gif while the like box is working properly. Any advice how to work this out?

  53. TechAdviser

    This is pretty nice feature but like somebody else mention here in comments it's not really easy to manage the comments. Maybe I can't find or there (on Facebook) are not any feature to see all comments at one single place and manage it there. You should visit all the pages and subpages with comments and check whats new – if there is any new comment. In WordPress you have all comments for all posts at one single place. With facebook comment box this is not the case (or I just can't find this).

  54. Fredrik Delin

    just remember that this code is now old. There is a new connection method, but just click the application wizard link in the post and facebook will take you to the new page!

  55. Kauser

    I have add fb connect to my site finally :D Now I wanna add manually twitter oponid and yahoo to my wp blog. is it possible?

  56. air force one shoes

    The post of thread is very nice and informative, I often come this froum and really love it! Actually I love various kinds of food so much and this forum I learn much things ,and this forum constantly hold many activities that can make us meet many people .and I know some websites which provide many good products and they are in discount ,they are **** welcome you!

  57. Arvin

    I was excited to see this but when I tried doing it, the screen images here did not match those I see on my Facebook. They're very diffferent. There's no more Steps 1-2-3.
    What happened? Please advise.

  58. HoTiCE_

    What do you think will be the impact of switching from your own WordPress commenting system to a Facebook comment box?

    Do you think it will increase user interaction? and in turn blog traffic? I'd be curious to have your opinion on this

    One thing I don't like right now is the lack of ability to simply moderate comments and see statistics. I know this is probably all possible via the graph API but for the common users…this is not an easy task

  59. Rims

    I am agreed with you. It is very easy to use facebook. It is becoming more popular day by day. I am using facebook.

  60. Ty

    Hi Ruhani, thank you for this easy to understand tutorial.. really helped…
    I created a DEMO/test comment form page but in mine (regardless of the browser and my log-in state) all i see is the option to Comment by Logging Into FaceBook so no anonymous option is visible.. (Name/Email)

    (PS: “Allow Anonymous Comments” is checked YES)

    any help would be appreciated…

  61. Cheryl

    For some reason, I can't get it to allow anonymous posts (for those with no facebook login)… I checked the 'anonymous' box, but still no luck… any idea what's going on or how to fix it?

  62. lukees

    I guess if you can't fix it and I can't, there's nothing to be done.

    The browser stats on our website show only 4.4% using IE6, so we may just let it slide.

  63. lukees

    I'm trying to set this up for a website and it's not loading in IE6. I just checked out your demo site and it isn't either.

    Any insight?

    I'm running IE6 in a virtual windows installation with VMWare Fusion on a MacBook Pro, though this shouldn't matter.

  64. apjet

    Not directly related to this post. I want to say I like the DISQUS comments. But it asks you to create a DISQUS account which I don't know if anyone would be interested.

  65. uttammitra

    hi i want this plugins please help me other wise my boss kick me out of my company.Just send plugins address send me.If possible then send twitter also.

  66. uttammitra

    hi i want this plugins please help me other wise my boss kick me out of my company.Just send plugins address send me.If possible then send twitter also.

  67. mfarney

    I really have no idea why web designers still earn their daily bread. It seems that anyone can create a blog in just minutes. The internet is simply amazing. Of course, for a sturdy business site a web designer can do more than an online free tool. Still, it never has been so easy to create a blog, even for people with no programming skills.
    Mathew Farney – Web Hosting

    1. John

      Umm…probably because not everybody wants a regular old blog with a few color changes? You know, there are still people that like things customized professionally.

  68. Starcraft 2

    facebook How to Install Facebook Connect Comments on WordPress Facebook has just introduced its first widget, the Facebook Comment box for Facebook Connect Now

    Now, if you would like to easily get Facebook Connect set up on your WordPress blog, you can easily do it with these simple steps

    your readers to comment with Facebook effortlessly How to tattoo Wow, nice tips, very easy understand, I have some works to do now

  69. Starcraft 2

    facebook How to Install Facebook Connect Comments on WordPress Facebook has just introduced its first widget, the Facebook Comment box for Facebook Connect Now

    Now, if you would like to easily get Facebook Connect set up on your WordPress blog, you can easily do it with these simple steps

    your readers to comment with Facebook effortlessly How to tattoo Wow, nice tips, very easy understand, I have some works to do now

  70. facebook connect

    I’m really glad to see this! One of the things I love about Facebook is that their products tend to actually work… I’ve been extremely frustrated with just about everything Myspace and OpenID hasn’t worked for me either..

  71. Harsh Agrawal

    Few days back I implemented the same but with little difference and that is keeping the same wordpress commnt box and beside it added an option to comment using facebook connect, but later on somehow I guess messed with commnts.php code and it stopped working. I will see if I can implement again this one..

Comments are closed.