我使用Google通讯录API在我的NodeJS应用中获取用户的联系人,我需要检查,是否与谷歌+联系,但我找不到办法在文档。目前我收到来自API的响应,如下所示:
{ id: { '$t': 'http://www.google.com/m8/feeds/contacts/ex%40domain.com/base/40411dcf8aeb5354' },
updated: { '$t': '2016-08-12T08:03:22.026Z' },
category:
[ { scheme: 'http://schemas.google.com/g/2005#kind',
term: 'http://schemas.google.com/contact/2008#contact' } ],
title: { type: 'text', '$t': 'TestGoogleContact' },
link:
[ { rel: 'http://schemas.google.com/contacts/2008/rel#edit-photo',
type: 'image/*',
href: 'https://www.google.com/m8/feeds/photos/media/ii%40risingapp.com/40411dcf8aeb5354/1B2M2Y8AsgTpgAmY7PhCfg' },
{ rel: 'self',
type: 'application/atom+xml',
href: 'https://www.google.com/m8/feeds/contacts/ii%40risingapp.com/full/40411dcf8aeb5354' },
{ rel: 'edit',
type: 'application/atom+xml',
href: 'https://www.google.com/m8/feeds/contacts/ii%40risingapp.com/full/40411dcf8aeb5354/1470989002026004' } ],
'gd$email':
[ { address: 'testcontact@somedomain.com',
primary: 'true',
rel: 'http://schemas.google.com/g/2005#home' } ] }
答案 0 :(得分:1)
通讯录API在Google+之前提供,因此无法提供个人资料信息。稍后添加了一项功能,只显示用户设置的G +照片,这可能是一个hacky / flakey启发式检查配置文件。但是,您可以使用People API轻松获取此信息,这会将G +配置文件信息加入到联系人中,并最终可能会替换Contacts API:https://developers.google.com/people/