2011-06-10 70 views
4

我是Facebook新應用程序。當它在IE上運行時,我遇到了這個應用程序的問題。Facebook應用程序在IE中運行不正常

登錄後重定向到搜索動作(zend-framework),然後當我點擊按鈕重定向另一個動作以及相同的動作。它會破壞會話。

<script type="text/javascript"> 

      window.fbAsyncInit = function() { 

       FB.init({ 
        appId : '<?php echo $this->appid ?>', 
        status : true, // check login status 
        cookie : true, // enable cookies to allow the server to access the session 
        xfbml : true // parse XFBML 

       }); 

       FB.Canvas.setSize({width: 760, height: 980}); 

      }; 

      (function() { 
      var e = document.createElement('script'); 
      e.src = document.location.protocol + 
       '//connect.facebook.net/en_US/all.js';e.async = true; 
      document.getElementById('fb-root').appendChild(e); 
      }()); 



     </script> 

HTML代碼

<div class="cross"> 
    <a href="<?php echo $this->url(array('controller' => 'index', 'action' =>'search','cancel'=>'c'),'default',true) ?>"> 
    </a> 
</div> 

請幫助我。 感謝您的考慮。

+0

分享一些更多的代碼。 – Patrioticcow 2011-06-10 21:17:49

回答

2

在你的控制器中,嘗試添加到你的init()函數中。

$this->getResponse()->setHeader('P3P', 'CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); 

這是一個已知的問題與IE

-1
<script type="text/javascript"> 

      window.fbAsyncInit = function() { 

       FB.init({ 
        appId : '<?php echo $this->appid ?>', 
        status : true, // check login status 
        cookie : true, // enable cookies to allow the server to access the session 
        xfbml : true // parse XFBML 

       }); 

       FB.Canvas.setSize({width: 760, height: 980}); 

      }; 

      (function() { 
      var e = document.createElement('script'); 
      e.src = document.location.protocol + 
       '//connect.facebook.net/en_US/all.js';e.async = true; 
      document.getElementById('fb-root').appendChild(e); 
      }()); 



     </script> 
+1

雖然這可能在理論上回答這個問題,但最好是在解決方案中包含解釋和邏輯。 – Lix 2012-02-14 13:21:55

相關問題