2014-03-12 41 views
0

我在这里遇到了一个非常奇怪的问题,我一直在使用Facebook登录按钮很久,现在它不能在新的网页上工作,正在发展。下面是代码:Facebook的登录按钮无法在IE8中工作

<!DOCTYPE html> 
    <html xmlns:fb="http://www.facebook.com/2008/fbml"> 
    <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 

     <title>Woyou</title> 
     <link rel="stylesheet" href="./styles/styles16.css" type="text/css" id="css"/> 

<script type="text/javascript" src="./js/saved_resource" type="text/js/default.I.js"></script> 
<script type="text/javascript" charset="UTF-8"> 

    function init() { 
    var screenX = screen.width; 
    var screenY = screen.height; 
    var screenRes = screenX/screenY; 
    screenRes = screenRes.toFixed(2); 
    if (screenRes == 1.60){ 
    document.getElementById("css").href= "./styles/styles16.css"; 
    } else if (screenRes == 1.77){ 
    document.getElementById("css").href= "./styles/styles17.css"; 
    } else if (screenRes == 1.33){ 
    document.getElementById("css").href= "./styles/styles13.css"; 
    } else if (screenRes == 1.25){ 
    document.getElementById("css").href= "./styles/styles12.css"; 
    } 
    } 
    </script> 
    </head> 

<body onload="init();" onunload="" onkeydown="return keyDown(event);" onkeyup="return keyUp(event);" id="body" style="overflow-x: hidden; overflow-y: hidden;"> 
<div id="fb-root"></div> 
<script type="text/javascript"> 
    window.fbAsyncInit = function() { 
    FB.init({ 
    appId  : '275229992538227', // App ID 
    channelUrl : '//www.ihaveseen.org/index.html', 
    status  : true, // check login status 
    cookie  : true, // enable cookies to allow the server to access the session 
    oauth  : true, 
    xfbml  : true //, // parse XFBML 
    //frictionlessRequests : true 
    }); 
    FB.getLoginStatus(function(response) { 
    if (response.status == 'connected') { 
     alert("conex"); 
    } else {} 
    }); 
    }; 
    (function() { 
     var e = document.createElement('script'); 
     e.type = 'text/javascript'; 
     e.src = document.location.protocol + 
     '//connect.facebook.net/en_US/all.js'; 
     e.async = true; 
     document.getElementById('fb-root').appendChild(e); 
     }()); 

<div class="snwbuttons" style="position: absolute; left: 70%; top: 20%; width: 5%; height: 5%; text-align: left;"> 
<div class="facebook-plugin" style="position: absolute; left: 5%; top: 15%; text-align: left;"><fb:login-button autologoutlink='true' perms='email,user_birthday,status_update,publish_stream,user_location,user_hometown,user_online_presence,friends_online_presence'></fb:login-button></div> 
</div> 

它用来做工非常精细了我,但我不知道它为什么不现在,我已经查了一些有关此问题,并试图更改代码不同的方式....任何想法?

回答

0

检查您的JavaScript代码是否存在错误。 IE8不喜欢额外的','在代码ID没有什么后。尝试从去除多余的逗号:

xfbml  : true //, // parse XFBML 
//frictionlessRequests : true 

通过online lint tool运行你的代码可以提供帮助。

+0

我已经做到了,这可能是一些无用的垃圾,所以很多尝试都是如此。顺便说一句,我已经检查过另一台电脑的网页,它工作正常,你可以试试吗?我正在使用IE8 – juanma

+0

一些更多的数据,当我激活IE选项中的inprivate按钮时,它的工作原理是,该工具用于不允许网络使用可爱和肮脏的东西,任何想法? – juanma

+0

好的!一些更多的数据。我已经用CCleaner清理了Internet Explorer,并且第一次将它连接完美,但只要我关闭并再次打开,它就不会再工作。任何想法?来吧! – juanma