2010-10-01 50 views

回答

0

那麼讓我們來看看源。如果我們打開http://connect.facebook.net/en_US/all.js它有如下的一段代碼:

FB.subclass('XFBML.Comments', 'XFBML.IframeWidget', null, { 
    _visibleAfter: 'resize', 
    _refreshOnAuthChange: true, 
    setupAndValidate: function() { 
     var a = { 
      channel_url: this.getChannelUrl(), 
      css: this.getAttribute('css'), 
      notify: this.getAttribute('notify'), 
      numposts: this.getAttribute('num-posts', 10), 
      quiet: this.getAttribute('quiet'), 
      reverse: this.getAttribute('reverse'), 
      simple: this.getAttribute('simple'), 
      title: this.getAttribute('title', document.title), 
      url: this.getAttribute('url', document.URL), 
      width: this._getPxAttribute('width', 550), 
      xid: this.getAttribute('xid') 
     }; 
     ... 

它是被獲得通過實際控件iframe的參數列表。

壞消息是,即使它仍然在文檔中列出(任何人都感到驚訝?),不再有像canpost這樣的參數,所以它只是被忽略。

好消息是,css參數仍然可以支持。在過去的好日子裏,他們允許你傳遞自定義的CSS(絕對URL形式,http://mysite.com/style.css),但我懷疑它仍然有效。嘗試創建隱藏評論框的自定義CSS樣式(檢查所需類名的註釋iframe)並傳遞它。如果這不起作用,那麼恐怕沒有別的事情可以做了。

相關問題