您如何从人到ContactEntry [英] How do you get from Person to ContactEntry
问题描述
据我所知,尚无法(现在)更新链接到Person(人物API)的照片,建议您使用Contact API来实现.
As far as I know it is not possible (yet) to update photos linked to Person (People API), and it is advised to achieve this using the Contact API.
但是,一个人如何从Person到ContactEntry?
我试图将Person的resourceName连接到" https://www. google.com/m8/feeds/contacts/default/full/",但出现"ResourceNotFoundException"错误.
I tried to concatenate Person's resourceName to "https://www.google.com/m8/feeds/contacts/default/full/" but I am getting "ResourceNotFoundException" errors.
推荐答案
当您找到一个有联系人的人时,该人将看起来像:
When you get a person with a contact in them, the person will look like:
{
metadata: {
sources: [
{
type: PROFILE,
id: "12345678"
},
{
type: CONTACT,
id: "abc123"
}
]
}
}
您应该找到类型为CONTACT
的metadata.sources
字段,然后可以在通讯录API中使用该联系人的id
. GET https://www.google.com/m8/feeds/contacts/default/full/<id>
应该返回联系人数据.
You should find the metadata.sources
field with type CONTACT
, then you can use the id
of that contact in the contacts API. GET https://www.google.com/m8/feeds/contacts/default/full/<id>
should return the contact data.
这篇关于您如何从人到ContactEntry的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!