How to Add Comments to a Facebook Fan Page

Last week I was playing around with some FBML and discovered that it’s really easy to add comments to a custom tab on your Facebook fan page. All you need is the page id and a little block of code.

The most difficult part of this is finding the page ID. It used to be in the page URL but ever since custom names for pages became available it’s a little harder to find. Of course, if you don’t have 25 fans yet or haven’t made a custom URL for your fan page, it will be easier to find the page ID.

The code to add comments to a custom tab on your fan page is the following:

<fb:comments xid=”84300445447″></fb:comments>

Please note that the ID number is the one for my fan page. You will want that to change that to the ID for your own page.

The best way to find the ID number is to:

  1. Go to your fan page and click on the logo
  2. Once in the album for the profile pictures the ID should be at the end of the page URL. If not, click on one of the images or logos and the ID number will be there. &id=84300445447 is at the end of mine so 84300445447 is the number I need to set up comments on my custom tab.

You can see a working example of this on the demo tab on my (Anti) Social Development fan page.

photo credit: violscraper

It's Time!

Start your WordPress website project now!

Contact Me! >>

StudioPress Premium WordPress Themes

Keep Reading:
How to Add a Facebook Share Button With a Custom Logo
How to Use the Facebook Livestream Application for Static Content and Dynamic Comments
Facebook Removing Boxes and Reducing Width of Fan Page Custom Tabs Very Soon
How to Edit the List of Facebook Friends on the New Profile Sidebar


  1. says

    Ooooh, nice little tip here, Kim. Now you have me wondering how best to utilize something like this – is it a “generic” comments area, or could it tie into something else on your page too? Maybe a post question, or something like that?

    Cheers for the great stuff as always!
    .-= Danny Brown´s last blog ..Community, Loyalty and the Power of Give =-.

  2. says

  3. Josh says

    Hi there,

    I’m trying to ad the fb:comments tag to my page, but when i do its not the right size. How can i make the comments block the same width as the rest of my page.



  4. james says

    Hi , I just want to know that , how to add like button on the comment box we have created by using the above code????


  5. shrawan says

    this is my fanpage

    I have put comment box but it’s not showing correct size. I have linked css in fbml. when I remove that link it shows perfectly normail and fixed. Can anyone help me why I’m not able to put correct sized comment box? And new problem I found that nomatter whatever I changed in my css file in my server it won’t affect my fanpage. why is this happening?


  6. Ed Bailey says

    Thanks, very useful. I spent 3 hrs looking for this answer. However, the reason it’s not working for some of these people is they are cutting and pasting and you used closed quotes on both sides of the i.d. If they type it in or change the quotes after pasting, it should work.

      • Ed Bailey says


        What I mean is that quotation marks come in pairs; the first quote “opens” the quote and the second one “closes” the quote. In certain fonts, they look identical. Your second quotation mark below is of the generic type. The first one however is distinguishable because its font is different (you need to magnify your code below to see what I’m talking about). That first mark is the type used to close a quotation. If someone simply copies and pastes the code straight off your page above, it won’t work. But, if they type the code in, they will put in the proper quotation marks and it will work.

        • Ed Bailey says

          Sorry I meant to paste the code at the bottom of my last reply. It comes right off your page above by copying and pasting:

          You can’t hardly see the first quotation mark, but it is not the proper one. It is a close quote.

          • says

            Aaah … yes, I’m aware of the problem. I’ve set up a new system for displaying code but haven’t fixed all of the articles. I’ll make a point to fix the more popular articles first.

  7. says

    I have tried to add the comments box to my custom iframe pages to limited success. I cannot control the width and they do not work in IE. I have also removed the scroll bars. Any thoughts?

    Thank you in advance.

    • says

      Hi David – I’m sure it’s set up differently on iframes than on fbml. It isn’t, however, something I have tested yet so I don’t have any answers for you.

Comments are closed. Please contact me for specific questions or subscribe to my newsletter.