I am trying to add an existing contact to an existing group through the
zend framework gdata library.
My code is as follows:
$extensionElements = $entry->getExtensionElements();
$extension = new Zend_Gdata_App_Extension_Element('groupMembershipInfo',
null, 'http://schemas.google.com/contact/2008');
$attributes1 = array();
$attributes1['deleted'] = array('namespaceUri'=>null,'name'=>'deleted',
'value' => 'false');
$attributes1['href'] = array('namespaceUri'=>null,'name'=>'href', 'value'
=> $group_id);
$extension->setExtensionAttributes($attributes1);
array_push( $extensionElements, $extension );
$entry->setExtensionElements( $extensionElements );
$entry->save(null, null, $extra_header);
This method works for updating emails, websites, addresses and phone
numbers of the contact, it only gives me this error with groups:
Error: exception 'Zend_Gdata_App_HttpException' with message 'Expected
response code 200, got 400 Group membership information not supported.'
Please if someone have come across this problem, I would appreciate some
help.
--
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html