2012-06-13 127 views
0

我有一个手机微型网站,我正在建设,目前我无法使用Facebook连接到黑莓手机。我收到错误“发生错误_ __ _。请稍后再试。”黑莓 - 脸谱网连接

我已经在其他所有设备上测试了这个功能,只有黑莓手机给我提供了问题。

这里是我用来加载应用程序的代码。

<div id="fb-root"></div> 
<script> 
window.fbAsyncInit = function() { 
FB.init({ 
    appId  : 'xxxxxxxxxxxxxxxxx', // App ID 
    status  : true, // check login status 
    cookie  : true, // enable cookies to allow the server to access the session 
    xfbml  : true // parse XFBML 
}); 

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

// Load the SDK Asynchronously 
(function(d){ 
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; 
if (d.getElementById(id)) {return;} 
js = d.createElement('script'); js.id = id; js.async = true; 
js.src = "//connect.facebook.net/en_US/all.js"; 
ref.parentNode.insertBefore(js, ref); 
}(document)); 
</script> 

<script> 
function loginUser() {  
FB.login(function(response) { }, {scope:'email'});  
} 
</script> 
<script> 
function handleResponseChange(response) { 
    document.body.className = response.authResponse ? 'connected' : 'not_connected'; 
    if (response.authResponse) { 
    console.log(response); 
    updateUserInfo(response); 
    } 
} 
</script> 


<script> 
function updateUserInfo(response) { 
FB.api('/me', function(response) { 
    window.location.href='home.php'; 
}); 
} 
</script> 


<div id="login"><p><button id="fblogin" onClick="loginUser();"></button></p></div> 

回答