获取共享联系人的照片
例如,如需获取联系人的最新照片版本,请使用以下元素:
<link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*"
href="https://google.com/m8/feeds/photos/media/example.com/c9012de"/>
发送以下 HTTP 请求:
GET https://google.com/m8/feeds/photos/media/example.com/c9012de
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-22。
[null,null,["最后更新时间 (UTC):2024-11-22。"],[[["Retrieve a contact's photo by sending an HTTP `GET` request to their photo link, replacing `DOMAIN` with your domain and `PHOTO_LINK` with the contact's unique numerical photo link value."],["If a contact lacks a photo, the photo link element won't have a `gd:etag` attribute, which is used to refer to specific photo versions."],["A successful photo retrieval results in an HTTP `200 OK` status code along with the photo itself."]]],["To retrieve a contact's photo, issue an HTTP `GET` request to the contact's photo link using this format: `https://google.com/m8/feeds/photos/media/DOMAIN/PHOTO_LINK`. Replace `DOMAIN` with your domain URL and `PHOTO_LINK` with the contact's unique photo ID. A successful request returns a `200 OK` status code and the photo. The absence of a `gd:etag` attribute in the photo link indicates the contact lacks a photo. The `gd:etag` specifies photo versions.\n"]]