2011-11-01 60 views
0

我有一個特殊的問題...Facebook的oauth窗口沒有出現在Safari中?

此功能:

function FBlogin() { //If the site session variable isn't there { 

    alert("Window should show up..."); 

window.fbAsyncInit = function() { 
    FB.init({ appId: '227964737259200', 
     status: true, 
     cookie: true, 
     xfbml: true, 
     oauth: true}); 

    function updateButton(response) { 


    if (response.authResponse) { 
     //user is already logged in and connected 

    alert("This is impossible, as you cannot already be logged in to facebook. Please refresh"); 


    } else { 

     //user is not connected to your app or logged out 

     FB.login(function(response) { 

if (response.authResponse) { 

//Request and handle user data here 

} else { 
    alert("no access granted"); 
} 
     }, {scope:'email'});  
     } 
    } 

    FB.getLoginStatus(updateButton); 
    FB.Event.subscribe('auth.statusChange', updateButton);  
}; 

(function() { 
    var e = document.createElement('script'); e.async = true; 
    e.src = document.location.protocol 
    + '//connect.facebook.net/en_US/all.js'; 
    document.getElementById('fb-root').appendChild(e); 
}()); 

} 

偉大的作品喚起的Oauth窗口在IE,鉻,FF和Opera。然而......

在Safari和Mobile Safari中它沒有。有沒有人有這個問題,或看到我的代碼可能會導致這個問題?

__ _ _ UPDATE * * * _ __ _ __

如果我在Safari中禁用彈出窗口阻止程序窗口會顯示出來。但是,這是我的應用程序的問題,,它不會在移動Safari :(

+0

所以當窗口出現時,它說什麼? –

回答