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.


Steps:

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.

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='[URL of 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='[URL of fbCommentsEN-migrated.js]' type='text/javascript'/>

Color Indication Information

   - URL of fbCommentsEN.js

Download fbCommentsEN.js and upload it on your server. Add the path/URL of the file here.

   - URL of fbCommentsEN-migrated.js

Download fbCommentsEN-migrated.js and upload it on your own server. Then add the path/URL of the file here.


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 = '[URL of fbCommentsEN.php]';

fbCommentsEN(fromMail,toMail,sendPath);

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';

   - URL of fbCommentsEN.php

Download fbCommentsEN.php and upload it on a server where supports PHP files.

Note: In case of you are not receiving emails, download fbCommentsEN_nc.php and upload it on your server. Then set new path here. This is PHP file which configured with no spam check.

i.e: var sendPath = 'http://MySite.com/fbCommentsEN_nc.php';


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

0 comments:

Post a Comment

 
Top