FB like button callbacks not working
<p>Can anyone tell me why callbacks are not working for the like button code given below? The code is standard set up in javascript as I can see. First button is initialized, then api is loaded asynchronously and callback functions are provided. Thanks.</p>



<pre><code>&lt;script&gt;

window.fbAsyncInit=function(){
    FB.init({
        appId:'',//App ID
        status:false,// check login status
        cookie:true,// enable cookies to allow the server to access the session
        xfbml:true// parse XFBML
    });
    // Additional initialization code here

    FB.Event.subscribe('edge.create', function(response) {
        //alert("user_id1:&lt;?php echo $user_id1; ?&gt;, user_id2:&lt;?php echo $user_id2; ?&gt;");
        /*var data={
            action:"ap_buttons_give_points",
            author_id:&lt;?php echo $author_id; ?&gt;,
            post_id:&lt;?php echo $post_id; ?&gt;,
            type:"like"
        }

        jQuery.post("&lt;?php echo $ajax_url; ?&gt;",data,function(resp){

        });*/
    alert('You just liked the page!');
});

    FB.Event.subscribe('edge.remove', function(response) {
        /*var data={
            action:"ap_buttons_take_points",
            author_id:&lt;?php echo $author_id; ?&gt;,
            post_id:&lt;?php echo $post_id; ?&gt;,
            type:"like"
        }

        jQuery.post("&lt;?php echo $ajax_url; ?&gt;",data,function(resp){
            //alert("fb remove:"+resp);
        });*/
    alert('You just unliked the page!');
});
};

// Load the SDK Asynchronously
(function(d){
    var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
    if (d.getElementById(id)) {return;}
    js = d.createElement('script'); js.id = id; js.async = true;
    js.src = "//connect.facebook.net/en_US/all.js";
    ref.parentNode.insertBefore(js, ref);
}(document));
&lt;/script&gt;
</code></pre>
