谷歌联系人API学习是联系谷歌+与否

时间:2021-04-11 15:26:19

I'm using Google Contacts API to get user's contacts in my NodeJS app and I need to check, has contact google+ or not, but I can't find a way to do it in docs. Currently I'm receiving response from API that looks like this:

我正在使用Google Contacts API在我的NodeJS应用中获取用户的联系人,我需要检查,是否与Google +联系,但我找不到在docs中执行此操作的方法。目前我收到来自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' } ] }

1 个解决方案

#1


1  

Contacts API pre-dates Google+ so profile information is not available. A feature was added later to show just the G+ photo from the profile if a the user set one, which could be a hacky/flakey heuristic to check for a profile. However, you can easily get this information by using the People API instead, which joins G+ profile information onto contacts and will likely replace the Contacts API eventually: https://developers.google.com/people/

联系人API提前发布日期,因此无法提供个人资料信息。稍后添加了一个功能,只显示用户设置的G +照片,这可能是一个hacky / flakey启发式检查配置文件。但是,您可以使用People API轻松获取此信息,这会将G +个人资料信息加入到联系人中,并最终可能会替换联系人API:https://developers.google.com/people/

#1


1  

Contacts API pre-dates Google+ so profile information is not available. A feature was added later to show just the G+ photo from the profile if a the user set one, which could be a hacky/flakey heuristic to check for a profile. However, you can easily get this information by using the People API instead, which joins G+ profile information onto contacts and will likely replace the Contacts API eventually: https://developers.google.com/people/

联系人API提前发布日期,因此无法提供个人资料信息。稍后添加了一个功能,只显示用户设置的G +照片,这可能是一个hacky / flakey启发式检查配置文件。但是,您可以使用People API轻松获取此信息,这会将G +个人资料信息加入到联系人中,并最终可能会替换联系人API:https://developers.google.com/people/