如果有人在Facebook评论插件中留言,我该如何发送通知邮件。当有人在Facebook评论插件中留言评论时,发送一封通知邮箱
我有这个脚本,但任何时候有人来到我的页面我收到一封电子邮件。
我只想当页面
<script> window.fbAsyncInit = function() {
FB.init({
appId : 'appid', // App ID
channelUrl : '//http://www.corkdiscos.com/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.subscribe('comment.create', function(response){
<?php
$to = '[email protected]';
$subject = 'Comment Posted on Testimonial Page';
$message = 'Comment Posted on Testimonial Page';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
});
};
// 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));
</script>
iv使用上面的代码更新了我的网页。 http://corkdiscos.com/testimonials.html我在找什么console.log? – 2012-01-04 20:45:39