我需要在使用 IBM MobileFirst Platform 创建的混合应用程序中实现社交登录(facebook、Google、Twitter 等)。
哪种社交登录方法最适合 mobilefirst 混合应用程序?
对于 Google 登录,我使用带有以下代码的 hello.js。
是否可以在 MobileFirst 中使用以下代码??谷歌将仅通过它提供响应Redirect URIs。我们如何才能获得对 MobileFirst 混合应用程序的响应?
hello.init({
google : GOOGLE_API_ID
},{scope: 'email' , redirect_uri:'redirect.html'});
hello.on('auth.login', function(auth){
// call user information, for the given network
hello( "google" ).api("me").then(function(json){
alert("Your email is "+ json.email);
}, function(e){
alert("Whoops! " + e.error.message );
});
});
请建议....