2010-10-18 61 views
0

我剛剛開發了一個Facebook應用程序。它的大部分工作正常,但多朋友選擇器不顯示在Internet Explorer上。多朋友選擇器不顯示在Internet Explorer上

儘管Firefox和Google Chrome工作正常,但它並未出現在IE上。也沒有任何錯誤消息。

這裏是我的多的朋友選擇器代碼:

<?php 
      // Prepare the invitation text that all invited users will receive. 
      $content = "<fb:name uid=\"".$me."\" firstnameonly=\"true\" shownetwork=\"false\"/> <a href=\"http://apps.facebook.com/".$app_url."/\">".$app_name."</a> is cool bla bla. \n". 
         "<fb:req-choice url=\"".$app_base . $app_url."/index2.php?firs=fb{$me["id"]}\" label=\" ".$app_name." Invite your friends!\"/>"; 



      ?> 



    <fb:serverFbml style="width: 760px;" width="760px"> 
    <script type="text/fbml"> 
    <fb:fbml width="760px"> 

    <fb:request-form 
      action="http://facebookAppUrl/<? echo $invite_href; ?>" 
      method="POST" 

      invite="true" 
      type="<? echo $app_name; ?>" 
      content="<? echo htmlentities($content, ENT_COMPAT, 'UTF-8'); ?>"> 

      <fb:multi-friend-selector 
        actiontext="<? echo $app_name; ?>' invite your friends!" 
        exclude_ids="<? echo $friends; ?>" 
        style='width: 760px' 
        showborder="false" 
        /> 

    </fb:request-form> 

    </fb:fbml> 
    </script> 
    </fb:serverFbml> 

我剛纔檢查了所有相關的帖子在Facebook上,但沒有運氣的開發者論壇。我無法弄清楚什麼是錯的。

+0

是否包含FB命名空間的標籤?這個例子是否適合你:http://fbrell.com/xfbml/fb:server-fbml-multi-friend-selector如果你確實需要比較你版本 – serg 2010-10-18 16:29:41

+0

的不同之處哦!非常感謝你節省了我的時間。我剛剛添加了xmlns:fb =「http://www.facebook.com/2008/fbml」,它工作。請發表評論作爲答案,以便我可以批准它的正確答案。再次感謝。 – enesismail 2010-10-18 16:50:06

+0

發表,謝謝。 – serg 2010-10-18 16:52:46

回答

1

由於原來的問題是在不包括FB命名空間標籤:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> 
+0

再一次,非常感謝。 IE和Safari需要明確定義名稱空間。 – enesismail 2010-10-19 08:44:13

相關問題