登录后使用Javascript获取用户凭据 [英] Fetching User Credentials using Javascript after login
问题描述
我想通过谷歌登录我的网络应用程序(* asp.net)后获取用户名和电子邮件..
我做过类似的事情这适用于Facebook:
FB.Event.subscribe('auth.statusChange',功能(响应){
if(response.authResponse){
//用户已为您的应用程序验证并登录Facebook
FB.api('/ me',功能(我){
//调试器;
如果(me.name && me.email){//我的代码}});}}
我想为google登录做同样的事情..我可以使用google a / c登录,但我不知道用什么事件来获取用户的凭据
Plz帮助
I want to fetch User's name and Email after he login via google to my web app(*asp.net)..
I've done something like this for facebook:
FB.Event.subscribe('auth.statusChange', function (response) {
if (response.authResponse) {
// user has auth'd your app and is logged into Facebook
FB.api('/me', function (me) {
//debugger;
if (me.name && me.email){//my code} });}}
I want to do like same for the google login.. I'm being able to login using google a/c but I dont know what event is to use to fetch user's credentials
Plz Help
推荐答案
这不是我个人所做的事。
但是本文介绍了G +身份验证API,并且应该告诉您如何获取所需的信息ed。
Google+登录 [ ^ ]
It's not something I've personally done.
But this article covers the G+ authentication API and should tell you how to get the information you need.
Google+ Sign-In[^]
这篇关于登录后使用Javascript获取用户凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!