无效范围facebook登录离子firebase

时间:2016-04-24 21:33:09

标签: ionic-framework firebase facebook-authentication

我正在使用angularjs ionic和firebase开发混合应用程序。我尝试用facebook添加登录。这是我的代码:

   var auth = $firebaseAuth( ref); 
   $scope.loginFB = function() {
   $cordovaOauth.facebook("MY FACEBOOK_APP_ID", ["My email"]).then(function(result) {
   auth.$authWithOAuthToken("facebook", result.access_token).then(function(authData) {
   console.log(JSON.stringify(authData));
   Popup('Success', JSON.stringify(authData) ); 
   }, function(error) {
   Popup('error',error); 
   });
   }, function(error) {
   Popup('error',error); 
    });
  }

当我在设备中运行代码时。我显示此消息错误:invalid scope : my email
我该如何解决这个问题呢。

1 个答案:

答案 0 :(得分:0)

请求用户电子邮件的范围是"email"(您现在拥有"My email")。另请参阅https://www.firebase.com/docs/web/guide/login/facebook.html