我的 Facebook Connect .php 网页适用于 Chrome、Firefox、IE9,但不适用于 IE8。它显示为空白屏幕
我开发了一个可以在 Chrome、Internet Explorer 9 和 Mozilla 中运行的应用程序,但在 Internet Explorer 8 中却没有成功。即使不通过 Facebook,我也会在 Internet Explorer 中看到空白屏幕。奇怪的是,如果我查看页面源代码,我可以看到所有源代码。 FB 里还是一样的白屏。
我用的是IE8。我发现的一切都可以追溯到 P3P 政策。每个站点都说要制定策略,以便 cookie 可以通过并且会话可以运行。
这是我的链接成立。
是的,这些都已经落实了。包括 FB 在自己的网站上使用 HONK hack 来绕过 IE 3rd party 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>
I have an APP developed that works in Chrome, Internet Explorer 9, and Mozilla but no luck in Internet Explorer 8. Even without going through Facebook, I get a blank screen in internet explorer. What is strange is if I view the page source, I can see all of the source. In FB it is still the same white screen.
I am using IE8. Everything I am finding goes back to a P3P Policy. Every site says to place a policy so that the cookies can pass and the session will run.
This is the link That I found.
Yes, these have been implemented. Including the HONK hack that FB uses on their own site to bypass the IE 3rd party cookie security issue.
Yes, I have already done changed the privacy settings with no luck.
Does anyone know what's wrong with this? The code looks like this:
<!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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您的代码不完整,但我会尝试一下。
首先,IE8 可能有问题,尝试包装 FBRoutine();在 document.onload 和 window.onload 中调用。
另请阅读此内容,如何检测 facebook 的 FB.init 何时完成,可能是调用FB.getLoginStatus时JS SDK还没有初始化。
请检查您是否发布了完整的代码,祝您好运
I don't think your code is complete, but I'll give it a shot.
First thing, there could be a problem with IE8, try wrapping the FBRoutine(); call in document.onload ow window.onload.
Also read this, How to detect when facebook's FB.init is complete, maybe the JS SDK is not yet initialized when you are calling FB.getLoginStatus.
Please check if you have posted your complete code, good luck
根据 FB 文档:
“将 XML 命名空间添加到文档的标记中。这对于 XFBML 在早期版本的 Internet Explorer 中工作是必要的。”
According FB documentation :
"Add an XML namespace to the tag of your document. This is necessary for XFBML to work in earlier versions of Internet Explorer."