Facebook订阅没有回电话。回调如何成功?
<script> window.fbAsyncInit = function() {
FB.init({status: true, cookie: true, xfbml: true}); var user= "<?
echo $data->id;?>";
document.getElementById("Hint").style.display='block';
FB.Event.subscribe('edge.create', function(response) {
$.ajax({
type: "POST",
url: "fbareceive.php",
data: "data="+response + "---" + user,
cache: false
});
(function() { var e = document.createElement('script'); e.type =
'text/javascript'; e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js'; e.async = true;
document.getElementById('fb-root').appendChild(e); }());
</script>
答案 0 :(得分:0)
$ .ajax()是一个jQuery函数。请阅读相关文档:http://api.jquery.com/jQuery.ajax/
简言之:
$.ajax({
type: "POST",
url: "fbareceive.php",
data: "data="+response + "---" + user,
cache: false,
success: function(){
alert('Success');
}
});