哪个 Google api 用于获取用户的名字、姓氏、图片等? [英] Which Google api to use for getting user's first name, last name, picture, etc?

查看:12
本文介绍了哪个 Google api 用于获取用户的名字、姓氏、图片等?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 oauth 授权,google 工作正常,并且正在从联系人 api 获取数据.现在,我想以编程方式获取 gmail 用户的名字、姓氏和图片.我可以使用哪个 google api 来获取这些数据?

I have the oauth authorization with google working correctly and am getting data from the contacts api. Now, I want to programmatically get a gmail user's first name, last name and picture. Which google api can i use to get this data?

推荐答案

我在联系人 API 论坛中四处寻找答案.当你得到 result-feed 时,只需在 Java 中执行以下操作-

I found the answer while looking around in the contacts API forum. When you get the result-feed, just do the following in Java-

String Name = resultFeed.getAuthors().get(0).getName();

String emailId = resultFeed.getId();

我仍在寻找获取用户个人资料图片的方法.

I am still looking for a way to get the user profile picture.

这篇关于哪个 Google api 用于获取用户的名字、姓氏、图片等?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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