使用 gdata-contacts 按电话号码获取联系人

Get contacts by phonenumber using gdata-contacts

我正在尝试使用联系人查询参数参考。参见 https://developers.google.com/google-apps/contacts/v3/reference#contacts-query-parameters-reference

我正在构建这样的查询:

URL feedUrl = new URL("https://www.google.com/m8/feeds/contacts/default/full");

Query query = new Query(feedUrl);

query.setMaxResults(1111);

query.setStringCustomParameter("phoneNumber", "123456789");

但是 Google API 正在返回所有联系人,而我只想要号码为 123456789 的联系人。

是否可以通过 phone 号码获得 google 联系人?

谢谢

尝试将查询更改为 https://www.google.com/m8/feeds/contacts/default/full?q="6785555455" . I tried this in oauth playground,并且能够检索到匹配 phone 号码 6785555455 的联系人。这是响应:

<gd:name>
  <gd:fullName>Hello</gd:fullName>
  <gd:givenName>Hi</gd:givenName>
</gd:name>
<gd:phoneNumber rel="http://schemas.google.com/g/2005#mobile"  uri="tel:+91-1234-222-321">(678)-555-5455</gd:phoneNumber>
<gContact:groupMembershipInfo deleted="false"    href="http://www.google.com/m8/feeds/groups/guntupalliswathi%40gmail.com/b  ase/6"/>
</entry>
</feed>

检查此 link 以供参考。