My Facebook Connect .php webpage works on Chrome, Firefox, IE9 but not on IE8. It shows up as a blank white screen
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开发者_JS百科,
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 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
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."
<html xmlns:fb="http://ogp.me/ns/fb#">
精彩评论