1

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>
4

1 回答 1

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');
            }
        });
于 2012-02-02T23:41:10.600 回答