Hi, There is a similar post that may help: http://groups.google.com/group/google-contacts-api/browse_thread/thread/44118d19610fba05
The idea is to get the My Contacts' group ID, use it to create a GroupMembershipInfo, then add it to the contact and update. Cheers, Julian. On Aug 7, 9:50 am, Jones <[email protected]> wrote: > Hi, > > I want to create one contact belong to "My Contacts" group by C# API. > But I don't know how to do it. > According to API doc, it only describes how to add contact to default > ("All Contacts") group. > > The following is example form google's website > (http://code.google.com/intl/zh-TW/apis/contacts/docs/2.0/ > developers_guide_dotnet.html#Creating) > > //////////////////////////////////////////////////////////////////////////////// > Contact newContact = new Contact(); > newContact.Title.Text = "Liz Doe"; > > EMail primaryEmail = new EMail("[email protected]"); > primaryEmail.Primary = true; > primaryEmail.Rel = ContactsRelationships.IsWork; > newContact.Emails.Add(primaryEmail); > > newContact.Content = "Contact information for Liz"; > ... > ... > ... > Uri feedUri = new Uri(ContactsQuery.CreateContactsUri("default")); > > //The example assumes the ContactRequest object (cr) is already set > up. > Contact createdContact = cr.Insert(newContact); > /////////////////////////////////////////////////////////////////////////////////// > > Does any one know how to create one contact belong to "My Contacts" > group ? > Please kindly help me to solve this problem. > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Contacts API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-contacts-api?hl=en -~----------~----~----~----~------~----~------~--~---
