我开发的APP适用于Chrome,Internet Explorer 9和Mozilla但在Internet Explorer 8中没有运气。即使没有通过Facebook,我也会在Internet Explorer中看到一个空白屏幕。奇怪的是,如果我查看页面源代码,我可以看到所有的源代码。在FB中它仍然是相同的白色屏幕。
我正在使用IE8。我发现的一切都可以追溯到P3P政策。每个站点都说要放置一个策略,以便cookie可以通过,会话将会运行。
这是我找到的link。
是的,这些已经实施。包括FB在他们自己的网站上使用的HONK hack来绕过IE第三方cookie安全问题。
是的,我已经完成了更改隐私设置而没有运气。
有谁知道这有什么问题?代码如下所示:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html id="facebook" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- START Init Facebook App -->
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId:'298230576859720',
cookie:true,
status:true,
xfbml:true,
authResponse:true,
oauth : true });
</script>
<!-- END Init Facebook App -->
<script type="text/javascript">
// START Facebook JS Feed Pop Up Code
function FBRoutine(){ // If user isn't already authenticated or logged in get authentication
FB.getLoginStatus(function(response) {
if (response.authResponse) {
// logged in and connected user, someone you know
//alert ('authed already');
// alert (response.status);
// FBFeed(); // Show feed pop up
window.location = "facebook-step-03-optin.php";
} else {
// no user session available, someone you dont know
//alert ('not authed');
//alert (response.status);
window.location = "facebook-step-02-login.php";
};
}); // End getLoginStatus
}; // End function
// END Facebook JS Feed Pop Up Code
FBRoutine(); // Run routine to detect FB authentication prior to submitting form and after validation.
</script>
答案 0 :(得分:0)
我不认为你的代码是完整的,但我会试一试。 首先,IE8可能存在问题,尝试包装FBRoutine();在document.onload ow window.onload中调用。 另请阅读How to detect when facebook's FB.init is complete,也许在调用FB.getLoginStatus时尚未初始化JS SDK。
请检查您是否已发布完整代码,祝您好运
答案 1 :(得分:0)
根据FB文件:
“将XML命名空间添加到文档的标记中。这对于XFBML在早期版本的Internet Explorer中工作是必要的。”
<html xmlns:fb="http://ogp.me/ns/fb#">