Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are not happy with the solution FB already provides (as scjosh explained), you can use Facebooks Javascript SDK a bit of ajax (jquery would be my favorite) to load a script with the mail() function.</p> <p>First load the JS SDK (make sure you change 'YOUR_APP_ID' and the channelURL!!):</p> <pre><code>&lt;div id="fb-root"&gt;&lt;/div&gt; &lt;script&gt; window.fbAsyncInit = function() { FB.init({ appId : 'YOUR_APP_ID', // App ID channelURL : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File 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 }; // 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)); &lt;/script&gt; </code></pre> <p>more information about js sdk, the loading and the channel file can be <a href="http://developers.facebook.com/docs/reference/javascript/" rel="nofollow">found here</a>. You should have an app or create an app in facebook for that reason. Information about setting up an app <a href="http://www.bloggermint.com/2010/05/how-to-add-facebook-comment-box-on-blogger-blogs/" rel="nofollow">is here</a>.</p> <p>Next step is to load the script with the mail() per jquery:</p> <pre><code>FB.Event.subscribe('edge.create', function(response) { $(document).load('mail.php?response='+response); } ); </code></pre> <p>And finally the mail.php:</p> <pre><code>if(isset($_GET['response'])) { $msg = 'A comment was left on '.$_GET['response']; mail('user@webpage.com','New comment',$msg); } </code></pre> <p>Hope that helps!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload