【问题标题】:google contacts api not getting all contacts谷歌联系人api没有获取所有联系人
【发布时间】:2014-07-09 03:28:19
【问题描述】:

我有一个 vb.net 应用程序,它可以检索我的所有联系人。 出于某种奇怪的原因,应用程序没有这样做,而是添加了我最常用的联系人。 任何帮助表示赞赏。

我的代码:

Dim authSubUrl = AuthSubUtil.getRequestUrl("http://www.example.com/Welcome.asp", "https://www.google.com/m8/feeds/contacts/default/full", False, True)

tmpEMailAddress = frmEmp.eMailAddress

'Dim tmpWREmailAddress As String = Mid(frmEmp.eMailAddress, 1, InStr(frmEmp.eMailAddress, "@") - 1) & "@roguevalleydoor.com"
tmpEMailAddress = Mid(frmEmp.eMailAddress, 1, InStr(frmEmp.eMailAddress, "@") - 1) & "@roguevalleydoor.com"

Dim rs As New RequestSettings("GMClient", tmpEMailAddress, frmEmp.NetPW)

' AutoPaging results in automatic paging in order to retrieve all contacts
rs.AutoPaging = True
Dim cr As New ContactsRequest(rs)

Dim f As Feed(Of Contact) = cr.GetContacts

ContactsListView.Items.Clear()

If f.Entries.Any = True Then
   Dim lvRow As New ListViewItem

   For Each ea As Contact In f.Entries

       For Each email As EMail In ea.Emails
           If (InStr(email.Address, "@") <> 0) AndAlso (ea.Title.Trim <> "") Then

              lvRow = ContactsListView.Items.Add(ea.Title)
              lvRow.SubItems.Add(email.Address)
           End If
       Next
   Next
End If

【问题讨论】:

    标签: .net vb.net email gdata


    【解决方案1】:

    注意:Feed 可能不包含用户的所有联系人,因为 返回的结果数量有默认限制。更多 信息,请参阅检索中的 max-results 查询参数 使用查询参数的联系人。

    https://developers.google.com/google-apps/contacts/v3/#retrieving_all_contacts

    【讨论】:

    • @Chandrew max-results 查询参数的最大限制是多少
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-05-11
    • 1970-01-01
    • 1970-01-01
    • 2011-10-09
    • 1970-01-01
    • 1970-01-01
    • 2020-03-26
    相关资源
    最近更新 更多