1

我开发了一个网页如下,请你帮我解释为什么这段代码不起作用?

当我喜欢该页面时, FB.Event.subscribe('edge.create' 中的警报不显示!?

http://www.mandanemedia.com/freelancer/

<div >
  <div id='subscribe' style='padding:10px; background:#fff;'>
    <center>
      <img src="fbbutton.jpg" style="width:290px; height:88px;"/>
    </center>
<fb:like-box href="http://www.facebook.com/pages/MandaneMediacom/275554465891715" width="292" show_faces="true" border_color="#fff" stream="false" header="false"></fb:like-box>
    </center>
  </div>
</div>
<div id="fb-root"></div>
</body>
<script type="text/javascript">
window.fbAsyncInit = function() {
    FB.init({
        appId:'275554465891715',
        status:true,
        cookie: true, 
        xfbml: true 
        });
    FB.Event.subscribe('edge.create', function(response) {
        alert('You liked the URL: ' + response);
    });
  };
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

</script>
4

0 回答 0