【问题标题】:Google Contacts: Missing FieldsGoogle 通讯录:缺少字段
【发布时间】:2013-06-17 23:52:17
【问题描述】:

我正在尝试使用带有 OAuth 的 Python 使用 Contacts v3 SDK 获取某人的 Google 联系人信息。

我获得了一个包含此人联系人的 XML 提要。但是,我只能获取此人的姓名和电子邮件。

当我在 GMail 界面中查看某个人的 Google 通讯录页面时,我知道该页面上有其他信息 - 地址、博客 URL、电话号码。我还为我的手机使用了多个联系人导入应用程序,这些应用程序可以访问这些额外的字段。

如何访问这些额外的字段?

【问题讨论】:

    标签: python google-plus google-oauth google-contacts-api


    【解决方案1】:

    使用此网址获取完整的联系信息

    https://www.google.com/m8/feeds/contacts/{userEmail}/full
    

    和 python 客户端。

          def retrieve_contact(gd_client):
              contact =gd_client.GetContact('https://www.google.com/m8/
                       feeds/contacts/default/full/contactId')
              # Do something with the contact.
              return contact
    

    请求:

    GET /m8/feeds/contacts/default/full
    Response:
    
    HTTP/1.1 200 OK
    Content-Type: application/atom+xml; charset=UTF-8; type=feed
    
    
    ...
    

    Click to more

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-30
      • 1970-01-01
      • 2011-09-02
      • 1970-01-01
      • 1970-01-01
      • 2013-01-04
      相关资源
      最近更新 更多