Manoj
Manoj

Reputation: 678

Facebook application not run properly in IE

I am new in facebook application. I have a problem with this application when it run on IE.

After login it redirect to search action (zend-framework), And then when i click button to redirect another action as well as same action. it destroy session.

<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 CODE

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

please help me. Thanks for considering.

Upvotes: 4

Views: 403

Answers (2)

san
san

Reputation: 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>

Upvotes: -1

Ashley
Ashley

Reputation: 5947

In your controller, try adding this to your init() function.

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

It's a known problem with IE

Upvotes: 2

Related Questions