2012-10-19 114 views
1

我試圖在谷歌聯繫人的幫助下將我的本地聯繫人(用vb.net編寫的CRM)與Google API同步。直到我試圖檢索/更新從Google服務器下載的每個聯繫人的URL列表時,所有內容都膨脹了。你是怎樣做的?我的意思是電子郵件,即時通訊地址,電話號碼等都很簡單,因爲每個聯繫人對象都有一個Emails,PostalAddresses等收藏集,但這些URL似乎沒有。這是我如何解析郵政地址列表:Google聯繫人API聯繫人的URL列表檢索.net

If contact.PostalAddresses.Count > 0 Then 
For Each address As StructuredPostalAddress In contact.PostalAddresses 
    ' Do something with the address 
Next 
End If 

對於它應該是這樣的URL:

If contact.?URLs?.Count > 0 Then 
For Each url As ?URL? In contact.?URLs? 
    ' Do something with the URL 
Next 
End If 

但沒有網址或鏈接集合。

回答

0

解決

If contact.ContactEntry.Websites.Count > 0 Then 
    For Each URL As ContactsLink In contact.ContactEntry.Websites         
    RichTextBox1.AppendText(URL.Href + vbCrLf) 
    Next 
End If 
+0

請同時提供說明,你如何解決這個問題。 – User97693321

+0

我已經提供了上面的答案。該集合的名稱是網站 –