2011-08-09 88 views
0

我正在做Facebook整合。當我登錄時,小部件不會重新加載。因此,我無法發表評論。當我重新加載窗口時,它工作正常。我做錯了什麼?Facebook評論整合失敗

我使用的是下面的代碼。

<script> 
    window.fbAsyncInit = function() { 
    FB.init({ appId: '217419501642964', 
      status: true, 
      cookie: true, 
      xfbml: true, 
      channelUrl:'https://creator.zoho.com/channel.html'}); 
    _ga.trackFacebook(); 
    }; 
    (function() { 
    var e = document.createElement('script'); 
    e.async = true; 
    e.src = document.location.protocol + 
      '//connect.facebook.net/en_US/all.js'; 
    document.getElementById('fb-root').appendChild(e); 
    }()) 
</script> 

TIA 登錄

+0

你是如何在登錄? – jBit

+0

我使用facebook插件提供的登錄按鈕登錄 –

回答

0

嘗試登錄後重新描繪的XFBML:

FB.Event.subscribe('auth.login', function(response) { 
    FB.XFBML.parse(document.getElementById('myfblogin')); 
    // where myfblogin is the id of your <fb:login-button> element 
});