“If-Match or If-None-Match header or entry etag attribute required” Error when trying to update a contact on google contacts using Zend Framework

徘徊边缘 提交于 2019-12-01 13:08:23

i got a solution in http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14476692

here is the message from that link:

// in listing 6... // somewhere before the updateEntry call add: $extra_header = array(); $extra_header='*';

// and then replace the current updateEntry call with the following: $entryResult = $gdata->updateEntry($xml->saveXML(),$entry->getEditLink()->href,null,$extra_header);

Updates to Google Contacts now work.

i get it work for my code. again there is a problem with the code in the post as well. that is

$extra_header = array(); 

$extra_header = array('If-Match'=>'*'); 

$entryResult  = $contactObj->updateEntry($xml->saveXML(),$entry->getEditLink()->href,null,$extra_header);

I think it will help you solve the update problem as well.

thanks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!