php - I can't delete an Event Feed with Google data API -
Hi friends, I'm trying to remove many incidents from the Google Calendar API (from a date range). I get the feed correctly, this problem is not Probleme removal function. I get this error: "Error: You have to specify the URI to post."
Can anyone help me out!
Thanks
$ Service = New Zend_Gdata_Calendar ($ customer); $ Query = $ service-> New event (); $ Query-> SetUser ('xxxxx'); $ Query-> SetVisibility ('Private- XXXX'); $ Query-> SetProjection ('full'); $ Query-> SetOrderby ('StartTime'); $ Query-> SetStartMin ('2010-01-20'); $ Query-> SetStartMax ('2010-01-28'); // Recover event list from calendar server {$ eventFeed = $ service-> GetCalendarEventFeed ($ query); } Hold (Zend_Gdata_App_Exception $ e) {echo "error:". $ E & gt; GetMessage (); } // Repeat through the list of events, by removing them // foreach ($ eventFeed as the $ event) {try {$ event- & gt; Delete (); } Hold (Zend_Gdata_App_Exception $ e) {echo "error:". $ E & gt; GetMessage (); }}
It seems that you use MagicCookie There are certifications, which will give you only read access. You must use ClientAuth or AuthSub authentication to read / write.
Edit : For example, how to use ClientAuth here:
$ user = 'me @ Example.com '; $ Pass = 'password'; $ Service = Zend_Gdata_Calendar :: AUTH_SERVICE_NAME; $ Client = Zend_Gdata_ClientLogin :: getHttpClient ($ user, $ pass, $ service); $ Service = new Zend_Gdata_Calendar ($ client); $ Query = $ service-> New event (); $ Query-> SetUser ('default'); $ Query-> SetVisibility ('private'); // the rest of your code
Comments
Post a Comment