This didnt worked, i added extension like phoneNumber,postalAddress,
Notes, it worked, but for the groupMembershipInfo didnt worked, what
could be wrong?
Here is the piece of code :
$extensionElements =
$entry->getExtensionElements();
$extension4 = new Zend_Gdata_App_Extension_Element
('groupMembershipInfo', null, 'http://schemas.google.com/contact/
2008');
$attributes4 = array();
$attributes4['deleted'] = array
('namespaceUri'=>null,'name'=>'deleted', 'value' => 'false');
$attributes4['href'] = array
('namespaceUri'=>null,'name'=>'href','value' => 'http://www.google.com/
m8/feeds/groups/varzariu.nicolae%40gmail.com/base/40a2e3420df476df');
$extension4->setExtensionAttributes($attributes4);
array_push( $extensionElements, $extension4 );
$entry->setExtensionElements(
$extensionElements );
Please let me know if im wrong.
Cheers
On Apr 2, 4:52 pm, "Julian (Google)" <[email protected]> wrote:
> Hi Andrew,
>
> Here is an example to add user to a group:
>
> $extensionElements = $entry->getExtensionElements();
> $extension = new Zend_Gdata_App_Extension_Element
> ('groupMembershipInfo', null, 'http://schemas.google.com/contact/
> 2008');
> $attribures1 = array();
> $attributes1['deleted'] = array
> ('namespaceUri'=>null,'name'=>'deleted', 'value' => 'false');
> $attributes1['href'] = array('namespaceUri'=>null,'name'=>'href',
> 'value' => 'http://www.google.com/m8/feeds/groups/user%40domain.com/
> base/7d60cf6309868fc6');
> $extension->setExtensionAttributes($attributes1);
> array_push( $extensionElements, $extension );
> $entry->setExtensionElements( $extensionElements );
> $entry->save();
>
> -Julian
>
> On Apr 2, 11:02 am, andyjimmy <[email protected]> wrote:
>
> > Great script for removing the groups. I haven't had any problems with
> > removing the group info. But haven't been able to put in group info.
> > I'm using zend like you have been doing and this is what i have so
> > far.
>
> > // group
> > $groupId = 'http://www.google.com/m8/feeds/groups/wsapyouth
> > %40gmail.com/base/7988c2040c9693c8';
> > $extensionElements = $entry->getExtensionElements();
> > $extension6= new Zend_Gdata_App_Extension_Element
> > ('GroupMembershipinfo', null,'http://schemas.google.com/g/2005');
> > $attributes6['href'] = $groupId;
>
> > $extension6->setExtensionAttributes($attributes6);
>
> > array_push($extensionElements, $extension6);
> > $entry->setExtensionElements($extensionElements);
>
> > any help would be greatly appreciated
> > thanks in advance!
> > Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---