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>