IE浏览器下跨域问题:Facebook - Iframe - Cross Domain Communication

Hi all,

I post this in dispair!  I've been building my application to work in FF, and it does so beautifully.  I've been checking design/css in IE, which is also perfect.  However, using the application in IE causes problems when a user submits a form (using method="post")...  In IE, after the form is submitted, the iframe loads on it's own page (away from facebook) and the posted data is lost.

This is only in IE.

Before the iframe loads on it's own page, it seems a page on facebook is in the middle of all this:
http://www.facebook.com/login.php?v=1.0 … 3Feid%3D19

After the above page loads, this is when my app is loaded on it's own page with no form data. 

I stress again, in FF the app works as normal!

I'm going nuts trying to work it out - I can't believe I am the only person developing an app using an iframe which has a form in it, but I can't find anyone else experiencing this issue.

Thanks a lot

Mat

 

+++++++++++++++++++++++++++++++++++++++++++++

 

+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++

 

 

you need add to frame in php


  header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');


also you need use session and store

            $_SESSION["fb_user_id"] = $facebook->fb_params['user'];
            $_SESSION["fb_session_key"] = $facebook->fb_params['session_key'];           

after store you can use

        $facebook->set_user($_SESSION["fb_user_id"], $$_SESSION["fb_session_key"]);         
        $fb_user_id = $facebook->get_loggedin_user();                     

and test


My Apps (Also we sell source):
Koi Pond:                http://apps.facebook.com/koipond/
Moon phases:          http://apps.facebook.com/moonphases/

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

摘自:http://forum.developers.facebook.net/viewtopic.php?id=22929

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值