Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ionic framework 如何使爱奥尼亚3重定向到应用程序登录后使用谷歌帐户?_Ionic Framework_Ionic3_Google Plus_Google Login - Fatal编程技术网

Ionic framework 如何使爱奥尼亚3重定向到应用程序登录后使用谷歌帐户?

Ionic framework 如何使爱奥尼亚3重定向到应用程序登录后使用谷歌帐户?,ionic-framework,ionic3,google-plus,google-login,Ionic Framework,Ionic3,Google Plus,Google Login,我想问一下,当我使用谷歌账号登录时,我该怎么做才能让我的爱奥尼亚3应用程序回到应用程序中 我已经对它进行了配置,它正在成功登录,但web视图被重定向到google.com主页,而不是像往常一样返回应用程序 这是我的密码: this.googlePlus.login({}).then(result => { console.error("LoginWithGooglePlus success: ", JSON.stringify(result)); console.log("Goog

我想问一下,当我使用谷歌账号登录时,我该怎么做才能让我的爱奥尼亚3应用程序回到应用程序中

我已经对它进行了配置,它正在成功登录,但web视图被重定向到google.com主页,而不是像往常一样返回应用程序

这是我的密码:

this.googlePlus.login({}).then(result => {
  console.error("LoginWithGooglePlus success: ", JSON.stringify(result));
  console.log("Google userId: ", result.userId);
  console.log("Google displayName: ", result.displayName);
  console.log("Google email: ", result.email);
  console.log("Google givenName: ", result.givenName);
  console.log("Google familyName: ", result.familyName);
  this.navCtrl.setRoot(HomePage, {}, { animate: true, animation: 'ios-transition' });
}).catch(error => {
  console.error("LoginWithGooglePlus error: ", JSON.stringify(error));
});
我想说的是,我以前在另一个应用程序上使用过这段代码,它工作得很好,但现在什么也没有发生,它是直接登录并重定向到google plus,而不返回应用程序

正在等待帮助,谢谢请尝试此功能

import {AlertController, App, ViewController, Events, NavController, LoadingController, Platform} from 'ionic-angular';

constructor(public http: Http,
                public app: App,
                public platform: Platform,
                public loadingCtrl: LoadingController,) {
        console.log('Hello Google Service Provider');
    }

this.app.getRootNav().setRoot('HomePage');
请试试这个

import {AlertController, App, ViewController, Events, NavController, LoadingController, Platform} from 'ionic-angular';

constructor(public http: Http,
                public app: App,
                public platform: Platform,
                public loadingCtrl: LoadingController,) {
        console.log('Hello Google Service Provider');
    }

this.app.getRootNav().setRoot('HomePage');

我也遇到了这个问题,我找到了解决办法


希望这对某人有所帮助

我也遇到了这个问题,并找到了解决办法


希望这对某人有所帮助

嗨,请分享一些代码以获得帮助;)您好,请共享一些代码以获取帮助;)