why facebook FB.Event.subscribe is not working?

亡梦爱人 提交于 2019-12-24 10:59:05

问题


I have developed a web page as follow, would you please help me why this code does not work?

When i liked the page, alert in FB.Event.subscribe('edge.create' does not display!?

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>

来源:https://stackoverflow.com/questions/13467139/why-facebook-fb-event-subscribe-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!