我正在尝试使用snapkit登录web api进行混合应用程序。我已经成功拦截了redirectURL中的访问令牌。我想知道是否有办法让用户Bitmoji使用此access_token以及login.js中的函数或http get调用?
Api docs:https://docs.snapchat.com/docs/login-kit/#web
目前我在app.component.ts上的深层链接功能中有access_token。我试图使用navController推送到新页面并将access_token作为参数传入,但这在尝试获取用户信息时没有帮助。
在此先感谢您的帮助。
这是Deeplinking,我使用myapp:// settings-set /作为URL重定向拦截access_token,并尝试使用匹配的url推送新页面。
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
this.deeplinks.routeWithNavController(this.nav,{
'/settings-set/:token': SettingsSetPage
}).subscribe((match) => {
// match.$route - the route we matched, which is the matched entry from the arguments to route()
// match.$args - the args passed in the link
// match.$link - the full link data
this.nav.push(SettingsSetPage, {
args: match
});
console.log('Successfully matched route', match.$args);
},
(nomatch) => {
// nomatch.$link - the full link data
console.error('Got a deeplink that didn\'t match', nomatch);
});
});
}
在设置集页面中,我使用以下方式接收参数:
this.args = navParams.get('args');
console.log("this is args", JSON.stringify(this.args));
但不知道如何使用这些信息来获取用户信息