【问题标题】:Facebook application not run properly in IEFacebook 应用程序在 IE 中无法正常运行
【发布时间】:2012-02-14 21:33:35
【问题描述】:

我是 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>

请帮助我。 感谢您考虑。

【问题讨论】:

    标签: facebook zend-framework


    【解决方案1】:

    在您的控制器中,尝试将其添加到您的 init() 函数中。

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

    这是 IE 的一个已知问题

    【讨论】:

      【解决方案2】:
      <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>
      

      【讨论】:

      • 虽然这在理论上可以回答这个问题,但最好在解决方案背后包含一个解释和你的逻辑..
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-02
      • 1970-01-01
      • 2018-11-07
      • 2018-12-14
      相关资源
      最近更新 更多