|
![](/images/resource/spacer.gif) |
|
ขอความรู้หน่อยครับ ผมต้องการใช้ FB.Event.subscribe('comments.add ') เมื่อ Comment แล้วให้ เข้า Databaseด้วย ควรทำยังไงครับ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
Code (PHP)
<?php
$db = mysqli_connect("127.0.0.1","root","","facebook_log");
$SQL = "insert into log_com(msg) VALUES('".$_POST['likecom']."')";
$ins = mysqli_query($db,$SQL);
?>
like.php
Code (PHP)
FB.Event.subscribe('comment.create', function(response) {
var namemsg = response.message;
$.ajax ({
type : "POST",
url :"postToPage.php",
data : "likecom="+namemsg,
success: success,
dataType: dataType
});
});
ไม่เข้า DB อะครับ ขอความรู้ หน่อยครับ มือใหม่สุดๆๆ AJAX
|
ประวัติการแก้ไข 2015-02-13 17:35:01 2015-02-13 17:49:23
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2015-02-13 17:34:03 |
By :
baseron01 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 02
|