June 15, 2011

Get Facebook Comment Notifications via Email in Blogger

Did you implement Facebook comment social plugin on your blog? We have already discussed about implementation via Add Facebook Comment Social Plugin to Blogger post. If you have implemented it on your blog, you may have find that you can moderate comments easily with Facebook comment moderation tool. But as you have more number of posts on your blog, you may find it buggy to keep an eye on Facebook comment moderation tool to see recent comments made on your blog. Sometimes you may have missed comments that needs more attention and users may have to wait for long hours until you reply for them. Therefore you will find it somewhat disturbing as no way of notifying new comments. Would you like to get notified whenever someone made a comment via Facebook comment plugin?

Facebook has no official solutions for get notifications other than checking out Facebook comment moderation tool. But as I browse web I was able to find a working solution to get comment notifications via email developed by a Facebook developer. It will help you to notify every comment via email whenever someone made comments on your blog via Facebook comment plugin. Also it's capable of sending notifications to your Facebook email address if you wish to. So it will save lot of time and you don't need to keep eye on Facebook comment moderation tool for new comments made on your blog. Interested? Let's find out how to set up notifications for Facebook comments.

Before You Go:

* You should specify Facebook JavaScript SDK and Open Graph Protocol, in order to wok this out.

* Make sure you have a file hosting site like Google Sites to upload and access few files we gonna need for this process.


1. Go to Blogger Dashboard.

2. Click on your Blog Title.

3. Navigate to Template tab.

Note: Before editing your template, you may want to save a copy of it. Read How to Back Up Your Template.

4. Click on Edit HTML button.

5. Tick on, Expand Widget Templates option.

6. Now search for <fb:comments which is Facebook Comment plugin code.

7. Add attribute class='fbcomments' and expr:title='data:post.title' to your Facebook Comment plugin code.

i.e: <fb:comments class='fbcomments' expr:title='data:post.title' expr:href='data:post.url' num_posts='2' width='500'/>

8. Now add below code snippets just after <head> in your template.

<script src='http://code.jquery.com/jquery-latest.min.js' type='text/javascript'/>
<script src='https://mayura4ever.googlecode.com/svn/fbCommentsEN.js' type='text/javascript'/>

Note: If you are using migrated Facebook Comment plugin which use migrated='1' attribute, use following code snippets instead of above.

<script src='http://code.jquery.com/jquery-latest.min.js' type='text/javascript'/>

<script src='https://mayura4ever.googlecode.com/svn/fbCommentsEN-migrated.js' type='text/javascript'/>

9. Now add following code snippet into JavaScript SDK, just after FB.init() method but just before }; - i.e: FB.init ({....}); [Add Code Snippet Here] };

var fromMail = 'info@blogspot.com';

var toMail = 'you@mail.com';

var sendPath = 'https://mayura4ever.googlecode.com/svn/fbCommentsEN.php';


Color Indication Information:

   - Your Blog Email

This is the mail address which states as the sender mail address in the mail you will be received. You can specify it as you prefer such as info@blogspot.com or whatever.

   - Email Recipient

This is email recipient address which is your email for notifications to be received. Facebook allowed you to add any email address including the @facebook.com, new Facebook mailing system. You can add multiple recipients too.

i.e: var toMail = 'you@gmail.com, friend@facebook.com, member@yahoo.com';

Note: In case if you are not receiving emails, try setting sendPath to https://mayura4ever.googlecode.com/svn/fbCommentsEN_nc.php

i.e: var sendPath = 'https://mayura4ever.googlecode.com/svn/fbCommentsEN_nc.php';

Credits: This has been implemented by Gil Goldshlager, a developer of Facebook and credits should goes to.

Enjoy :-)

Awesome! Thanks for coming by and taking your time to read this post :) I hope you have learnt something today. Now you can share it with your friends and I'd love to hear from you too.

Related Posts and Categories

Category, , , , , ,


* If you got any questions not related to this post, please ask it at our Support section.

* Make sure your comment is genuine and comply with our commenting guidelines.

* Review your email and reply notification settings to receive replies via email.

* Experiencing problems when commenting? Please report them at our Support section.

sai said...

people using blogger cannot upload any documents/files...(esp this javascripts *.js)

Mayura De Silva said...

You can find free hosting solution like Google Sites to upload your files mate :)


sai said...

Thanks Mayura for replying :)
Could you please say where can I find that JavaScript SDK?

Mayura De Silva said...

Oh just click on the link in post mate :) It will direct you to that post.


sai said...

Thanks Mayura :)
I overlooked that "Before You Go" part.
Sorry for unnecessarily troubling you.

Mayura De Silva said...

Ohw it's alright mate :) Hope you will love to get comment notifications via email...


Thomas Benezeth said...

Hi, thanks for this !

I don't understand when u said "upload it on your own server", what do u mean by "upload it" on the server (i mean it's not like a pic u can upload.... what am i suppose to do ?)


Mayura De Silva said...

Hi Thomas,

Ah... It's the linked I've given to you in the same line mate. It's start with "Download...". Click on that link and you can download the necessary file :)

Got it? :)