Hi Carl,
By default contacts are added into the Other Contacts group, you need
to add the group information to the contact entry to insert the
contact to My Contacts.
For example:
GroupMembershipInfo groupMembershipInfo = new GroupMembershipInfo();
groupMembershipInfo.setHref("http://www.google.com/m8/feeds/groups/user
%40domain.com/base/6");
contactEntry.getGroupMembershipInfos().add(groupMembershipInfo);
URL postUrl = new URL("http://www.google.com/m8/feeds/contacts/
[email protected]/full");
myService.insert(postUrl, contactEntry);
Note: My Contact group URL may change, it is recommended to search the
groups feed for the correct one, in this case, the "Contacts" group
URL is:
http://www.google.com/m8/feeds/groups/user%40domain.com/base/6"
Cheers,
Julian
On Oct 27, 7:02 pm, Carl Howell <[email protected]> wrote:
> I'm using the Java library, 1.37 or 1.39 with the same results, and am
> having some trouble inserting contacts. When I use the ContactsService
> class to do the insert, the contact always ends up in Other Contacts
> instead of My Contacts. I've also tried doing the insert with the
> GoogleService class, and while the contact gets created in My
> Contacts, it never has a name.
>
> I've gone back to just trying to do the sample from the Developer's
> Guide using Client Authentication, and I get the same result.
>
> I'm doing this in Eclipse on Leopard and have tried JVM 1.5, 1.5.0,
> 1.6, and 1.6.0.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---