I would like an email to be sent every time a user posts a facebook comment.
How do I do this?
Thanks

Comments

Jaypan’s picture

You'll have to ask Facebook. This is a Drupal forum.

redsd’s picture

You could try using http://developers.facebook.com/docs/reference/plugins/comments/
facebook uses javascript to send the comments to there database.

Since the comments are loaded in your website, you might be able to capture the comment text, before it is send.
otherwise I would recommend using the normal methodes provided by facebook:
http://developers.facebook.com/docs/reference/javascript/FB.Event.subscr...

The above describes how you can get updates when someone commented on your website.

LTech’s picture

Thanks for the info. I have the code I need I just can't figure out where to put it in the drupal files.
I need to put:

in the header tag.
How do I do that?
And this javascript in the body:

window.fbAsyncInit = function() { FB.init({ appId : 'YOUR_APP_ID', // App ID status : true, // check login status cookie : true, // enable cookies to allow the server to access the session oauth : true, // enable OAuth 2.0 xfbml : true // parse XFBML }); // Additional initialization code here fbcen_gdocs('dHtzRmb3XU5xMWJhS2Z0VlFNRGNFTVE4MQ'); }; // Load the SDK Asynchronously (function(d){ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; d.getElementsByTagName('head')[0].appendChild(js); }(document));

I've tried adding the code to the html.tpl.php files, and also tried creating a facebook.js file and called it in drupal_add_js'(facebook.js'); in template.tpl.php but nothing seems to work.
If you could help me with this I would really appreciate it.
Thanks

redsd’s picture

If you used to the template files , make sure you edit the files in the correct template folder.

Did you try clearing the cache?

Look at the source code of your website to see if you can find the code you added to your template.

pragna’s picture

Hi Guys,

I have developed new module for this requirement.
https://www.drupal.org/project/fb_comment_notification

Thanks,
Pragna

Pragna J Bhalsod