2011-12-20 25 views
0

我有一個問題,成功用戶登錄後,我想重定向用戶到某個頁面他來自等等......)。在此之前的一週內,一切正常,但現在它不想在IE中重定向,但它重定向爲Chrome或FF。 我認爲這是因爲在fa​​cebook all.js中存在javascript錯誤,然後重定向不會在IE中執行。我錯了嗎?Facebook的登錄IE瀏覽器 - 頁面上的錯誤 - all.js - (不安全的JavaScript嘗試訪問框架與URL ...)&重定向

我有一個共同的Facebook登錄按鈕:

登錄...

的Javascript(當更迭我想重定向頁面 - 這就是問題所在!)

window.fbAsyncInit = function() { 
    FB.init({ 
     appId : '12345', 
     session : null, // don't refetch the session when PHP already has it 
     status : true, // check login status 
     cookie : true, // enable cookies to allow the server to access the session 
     xfbml : true // parse XFBML 
    }); 

    // whenever the user logs in, we redirect the page 
    FB.Event.subscribe('auth.login', function(response) { 
     if (response.authResponse) { 
      window.parent.location="MY URL"; 
     } 
    }); 
    }; 

    (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); 
    }()); 

所以當用戶單擊登錄按鈕時,出現以下錯誤:不安全的JavaScript嘗試訪問帶有URL的幀....域,協議和端口必須匹配。 (在鉻中檢查)。在IE中我得到:權限被拒絕,all.js(http://connect.facebook.net/en_US/all.js)。

我試着添加標頭P3P:CP =「IDC DSP COR CURA ADMa我們的IND PHY ONL COM STA」,但它沒有幫助(用http://web-sniffer.net/檢查標題在那裏!)。

我現在可以做什麼?

回答

相關問題