我正在使用PhoneGap/Cordova和Ionic /角与Firebase简单登录Facebook。我的登录页面上有一个应该调用auth.login()的按钮。这在Chrome中是可行的,但是当我通过iPhone 5s (iOS7)通过xCode运行它时,我会得到以下错误:
2014-07-07 18:47:44.921 HOST-ENTOURAGE[650:60b] Setting the WebView's frame to {{0, 0}, {320, 524}}
2014-07-07 18:47:44.928 HOST-ENTOURAGE[650:60b] THREAD WARNING: ['InAppBrowser'] took '40.712158' ms. Plugin should use a background thread.
2014-07-07 18:47:47.029 HOST-ENTOURAGE[650:60b] {"code":"UNKNOWN_ERROR"}我尝试过的事情:
回购公司在这里:东道主陪同人员回购
我已经与此斗争了几个小时,因此,任何帮助都会非常感谢!
更新:这是我正在使用的代码。感谢加藤指出这将是更有用的!
var chatRef = new Firebase('https://host-entourage.firebaseio.com');
var auth = new FirebaseSimpleLogin(chatRef, function(error, user) {
if (error) {
console.log(error);
} else if (user) {
$rootScope.$apply(function(){$location.path('/main/login/loginchoice'); });
isLoggedIn = true;
console.log('User ID: ' + user.uid + ', Provider: ' + user.provider);
} else {
console.log('Not logged in');
}
});对于按钮功能:
login: function() {
if (!isLoggedIn) {
auth.login('facebook', {
rememberMe: true,
scope: 'email,public_profile'
});
} else {
$location.path('/main/login/loginchoice')
}发布于 2014-07-08 23:08:35
一个可能的建议是检查您的API/KEY设置,如这个线程处理Twitter / Firebase中所示。
如果这不是您的问题,文档说,当您遇到UNKNOWN_ERROR时,请与UNKNOWN_ERROR联系。
https://stackoverflow.com/questions/24622788
复制相似问题