通过 Google API 获取用户信息 [英] Get user info via Google API

查看:60
本文介绍了通过 Google API 获取用户信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过 Google API 从用户的个人资料中获取信息?如果可能,我应该使用哪个 API?

Is it possible to get information from user's profile via Google API? If it is possible, which API should I use?

我对这些信息很感兴趣:

I'm interesting in such information:

从用户的个人资料中获取其他信息也会很酷.

Also it would be cool to get other information from user's profile.

推荐答案

将此添加到范围 - https://www.googleapis.com/auth/userinfo.profile

授权完成后,从-https://www.googleapis.com/获取信息oauth2/v1/userinfo?alt=json

它有很多东西 - 包括姓名、公开个人资料网址、性别、照片等.

It has loads of stuff - including name, public profile url, gender, photo etc.

这篇关于通过 Google API 获取用户信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆