使用Zend_GData和Google Contacts API将联系人添加到组中
||
我有一个使用zend_gdata的应用程序,并使用下面的代码创建联系人。
$doc = new DOMDocument();
$doc->formatOutput = true;
$entry = $doc->createElement(\'atom:entry\');
$entry->setAttributeNS(\'http://www.w3.org/2000/xmlns/\' ,\'xmlns:atom\', \'http://www.w3.org/2005/Atom\');
$entry->setAttributeNS(\'http://www.w3.org/2000/xmlns/\' , \'xmlns:gd\', \'http://schemas.google.com/g/2005\');
$doc->appendChild($entry);
// add name element
$name = $doc->createElement(\'gd:name\');
$entry->appendChild($name);
$fullName = $doc->createElement(\'gd:fullName\', htmlentities($data->firstname . \' \' . $data->lastname));
$name->appendChild($fullName);
// insert entry
$entryResult = $gdata->insertEntry($doc->saveXML(), \'http://www.google.com/m8/feeds/contacts/default/full\');
是否有可能将功能组添加到刚创建的联系人中?
没有找到相关结果
已邀请:
2 个回复
坝硷操
步骤3) 连接到gmail并执行查询
请注意,您返回了编辑链接,以便保存后可以更新联系人或检查修改
期差骇蓟