我有一个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
答案 0 :(得分:4)
注意:Feed可能不包含所有用户的联系人,因为 返回的结果数量有默认限制。更多 信息,请参阅检索中的max-results查询参数 使用查询参数的联系人。
https://developers.google.com/google-apps/contacts/v3/#retrieving_all_contacts