3

如何使用 Google Contact API (c#) 在 Google Contact 中创建新的“自定义字段”?

我用了:

ExtendedProperty obj_ExtendedProperty = new ExtendedProperty(); 
 obj_ExtendedProperty.Name             = "Department";
 obj_ExtendedProperty.Value            = "Sales";
 ContactEntry.ExtendedProperties.Add(obj_ExtendedProperty);

谢谢

4

1 回答 1

2

看看ContactEntry类以及如何更新它

检索您的联系人:

RequestSettings rs = new RequestSettings(this.ApplicationName, this.userName,this.passWord);      
ContactsRequest cr = new ContactsRequest(rs);  
Contact contact = cr.Retrieve<Contact>("http://www.google.com/m8/feeds/contacts/test@gmail.com/full/12345");

更新您的联系人:

UserDefinedField customField= new UserDefinedField("yourFieldName","yourFieldValue);  
contact.addUserDefinedField(customField);  
Contact updatedContact = cr.Update(contact);
于 2010-04-02T14:53:46.660 回答