ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Adding Facebook comments in Tumblr blog posts

Updated on March 27, 2013

The default Disqus commenting system implemented in Tumblr isn't my favorite. I like Facebook comments because it is light and easy. Disqus commenting system was off in my Tumblr blog I didn't even bother to turn it on and as always I came through some articles half of them worked for me but their setting up part worked not the implementing one. So here it is how I added Facebook comments in my Tumblr blog posts.

Adding Facebook Comments:

First of all you have to setup a Facebook app.

Setup Facebook App:

Even if you already have a Facebook account you have to sign up again at Facebook developers site to become a developer and then create an app. So head over to http://developers.facebook.com/apps and create your app, give it a name, there will also be a security check and then you can submit.

After submitting you'll be sent to the details page of you app. So in the Settings->Basic page of the app on the bottom click Website with Facebook login and enter your Tumblr blog url. You can enter an app namespace, I didn't enter any app namespace, enter your contact email and then the app domain which is also your Tumblr blog url or you can just span the domain and enter Tumblr.com. Just write down your app ID, you're gonna need it when implementing Facebook comments. Go to the Settings->Advanced page and make sure that App Type is selected as Web. You can also configure your app from that page there are many advanced settings on that page, I didn't touch any of that.

Implementing Facebook Comments:

First of all you need to add some meta codes to your theme. Add these meta codes right after the <head> attribute.

<meta property="fb:app_id" content="xxx"/>

Replace xxx with your Facebook app ID and add the below two lines right below the above one.

<meta property="og:title" content="{block:PostSummary}{PostSummary} - {/block:PostSummary}{Title}"/>
<meta property="og:description" content="{MetaDescription}"/>

Remove the "xxx" with your app ID from the below line.

<script src="http://connect.facebook.net/en_US/all.js#appId=xxx&amp;xfbml=1"></script>

And add the below codes right after {/block:Posts}

{block:PermalinkPage}
<fb:comments href="{Permalink}"></fb:comments>
{block:PermalinkPage}

If you add the above code before the {/block:Posts} then Facebook comments will also be shown on your homepage under every blog posts which will ruin your theme.

Getting Notifications of new comments

It is really easy just go to http://developers.facebook.com/tools/comments or simply click one of your posts and wait for the Facebook comments to load then click settings which is on the right of the comments. The settings tab will appear, you can find the Moderators field in the settings just add your Facebook name in the moderators field or any one of your friend's name who is willing to moderate your blogs comments. Save it and you're done. Note: If you add one of your friend's name then that person will receive a notification in which he has to accept if he wants to moderate your blog's comments.

That's it. Its really easy but many writers present their own instructions. The above method worked for me that's why I wrote about it. You can see a live demo at my blog post here.

    <meta property="fb:app_id" content="xxx"/>

Replace xxx with your Facebook app ID and add the below two lines right below the above one.

    <meta property="og:title" content="{block:PostSummary}{PostSummary} - {/block:PostSummary}{Title}"/>
    <meta property="og:description" content="{MetaDescription}"/>

Remove the "xxx" with your app ID from the below line.

    <script src="http://connect.facebook.net/en_US/all.js#appId=xxx&amp;xfbml=1"></script>

And add the below codes right after {/block:Posts}

    {block:PermalinkPage}
    <fb:comments href="{Permalink}"></fb:comments>
    {block:PermalinkPage}

Comments

    0 of 8192 characters used
    Post Comment

    • Ali Darakhshaan profile imageAUTHOR

      Ali Ahmed 

      4 years ago from Karachi, Pakistan

      @Sofia 1- Can you be more specific please? and for no. 2 you have to create an app and add the app id in the meta tag mentioned above also turn on notifications for that app from the facebook developers area.

    • profile image

      Sofia 

      4 years ago

      HI!

      Thanks for the tutorial, it worked right off! I also wrapped a div around the code in order to be able to position it better in the theme.

      Problems:

      1. with or without the div, the comments box does not shop up in mozilla firexfox. (latest version) no idea why. Any thoughts?

      2. the comments do not get into the developers comments page. I can see them in the site, not in the facebook page.

      thanks!!!

    • Ali Darakhshaan profile imageAUTHOR

      Ali Ahmed 

      5 years ago from Karachi, Pakistan

      And sorry for replying so late I've been extremely busy.

    • Ali Darakhshaan profile imageAUTHOR

      Ali Ahmed 

      5 years ago from Karachi, Pakistan

      Line 10 goes right after the head tag. @Themibaby maybe you have remove quotes from the href or something please tell me how you are placing the codes in your theme. To adjust the width you can simply use style="width:110px;" put this code right after href="{Permalink}" remove the 110 with the width you want to specify.

    • profile image

      Thembibaby 

      5 years ago

      Im a begginer at all this and the thing is right where i want it buut it's a red box that says href url is not properly formatted. please help. and where does line 10 go, and by remove do u mean replace?

    • profile image

      Maria 

      5 years ago

      It worked but do u know how i can change the width?

    • profile image

      Bren 

      5 years ago

      Where does Line 10 go?

    • profile image

      Robin! 

      5 years ago

      This was really helpful! I just added Facebook comments to my own tumblr. I really like this option because people rarely comment on my site. They talk about it on Facebook. I figure this is a good way to get people to do it on my blog.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://hubpages.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)