以编程方式添加“新自定义字段"使用Google联系人API的Google联系人 [英] Programatically adding "New Custom Field" To Google Contacts using Google contact API

查看:63
本文介绍了以编程方式添加“新自定义字段"使用Google联系人API的Google联系人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Google Contact API(c#)在Google联系人中创建新的自定义字段"?

How to create new "Custom Field into Google Contact using Google Contact API (c#)?

我用过:

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

感谢

推荐答案

看看 检索您的联系人:

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);

这篇关于以编程方式添加“新自定义字段"使用Google联系人API的Google联系人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆