【问题标题】:Get contacts by phonenumber using gdata-contacts使用 gdata-contacts 通过电话号码获取联系人
【发布时间】:2015-11-10 04:19:45
【问题描述】:

我正在尝试使用联系人查询参数参考。见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 = new Query(feedUrl); 查询.setMaxResults(1111); query.setStringCustomParameter("phoneNumber", "123456789");

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

是否可以通过电话号码获取谷歌联系人?

谢谢

【问题讨论】:

    标签: java gdata google-contacts-api


    【解决方案1】:

    尝试将查询更改为 https://www.google.com/m8/feeds/contacts/default/full?q="6785555455" 。我在oauth playground 中进行了尝试,并且能够检索到具有匹配电话号码 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 以供参考。

    【讨论】:

      猜你喜欢
      • 2016-12-26
      • 2014-01-10
      • 2012-06-09
      • 2011-07-30
      • 1970-01-01
      • 2015-06-01
      • 1970-01-01
      • 2015-01-24
      • 1970-01-01
      相关资源
      最近更新 更多