Search code examples
facebookjoomla2.5facebook-commentsnotifyjoomla-k2

Joomla K2 item facebook comment notify author email


OK, so this a bit tricky, but there has to be some way to do this with facebooks FB.event?

The setup and problem.

Every K2 item (page) has a comment box. Need to notify AUTHOR of said page when comments are made on their entries

So when someone makes an entry on the facebook comments box, I want to make sure that the specific author is notified via email that a comment has been made. I'm thinking that one would first have to create some sort of variable for each author and then connect that wwith their specific email. Then write some FB.event handler sending email based on the author.

Is there anyone who can help me figure out how to do this?

EDIT Please follow this link PHP variable from external file? for a complete solution on this subject and what I was trying to accomplish here.


Solution

  • You need to use FB.Event.subscribe and subscribe to the comment.create event. On firing that event you can call an ajax function to send an email.

    Reference: http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/