2016-03-17 39 views
0

即时尝试第一个应用程序的android和ios.i想使登录与twitter.It工作是铬切换设备模式。但是,所以我安装在我的android手机我无法登录。什么是问题?对不起,我的英文不好..ionic + firebase/authWithOAuthPopup

$scope.LoginTwitter = function(){ 

    ref.authWithOAuthPopup("twitter", function(error, authData) { 

     if (error) { 
     console.log("Login Failed!", error); 
     alert(error); 
     } else { 
     // console.log("Authenticated successfully with payload:", authData); 
     UserControlfunc(authData); 
     $state.go("home"); 

     } 
    }); 
    } 

回答

0

我一直试图让谷歌/脸书也工作。 使用弹出方法我只有iOS(iPad Air 2)的成功,但我无法让它为Android(One Plus 2)工作。它确实似乎在Nexus 6模拟器上工作,当我做'离子运行安卓'时,但仅此而已。

$authWithOAuthPopup("google").then(function(authData) { 
    $localStorage.uid = authData.uid; 
    $localStorage.token = authData.token; 

}).catch(function(error) { 
console.log(error); 
}); 

我试过$ authWithOAuthRedirect,但无论是我的设备