Google コンタクトの Google API の初心者です。すべての連絡先の一覧表示と新しい連絡先の追加を実装しました。連絡先の更新、編集、削除に問題があります。多くの Web サンプルを試しましたが、成功しませんでした。手伝って頂けますか?
public static void EditContact(string id, string name, StructuredPostalAddress address)
{
ContactsQuery query = new ContactsQuery(ContactsQuery.CreateContactsUri("default"));
ContactsFeed feed = GContactService.Query(query);
foreach (ContactEntry entry in feed.Entries)
{
foreach (EMail email in entry.Emails)
{
if (email.Address == id)
{
Organization org = new Organization();
org.Rel = ContactsRelationships.IsWork;
org.Title = "President, CEO";
org.Name = "John Doe Enterprises";
org.Primary = true;
entry.Name = new Name() { FullName = name };
entry.PostalAddresses.Add(address);
entry.Organizations.Add(org);
// error:
// Execution of request failed
ContactEntry updatedEntry = (ContactEntry)entry.Update();
}
}
}
}
タイプ 'Google.GData.Client.GDataRequestException' の未処理の例外が Google.GData.Client.dll で発生しました
追加情報: リクエストの実行に失敗しました: