Hi, I have been stuck for 3 days trying to add an entry programatically to google calendar.
I have to write my own code to add the event, but I am using http://code.google.com/intl/nl/apis/calendar/docs/2.0/developers_guide_protocol.html#CreatingEvents as a guide. 1. I login using the ClientLogin. 2. I get the authentication token. 3. I add the authentication token to the header of the POST. 4. I receive a gsessionid. And now things started to go wrong. This is my code: strTest = <entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="http:// schemas.google.com/g/2005"> <title type="text">Tennis</title> <content type="text" /> <gd:when endTime="2009-05-15T15:30:00.000-07:00" startTime="2009-05-15T15:00:00.000-07:00" /> </entry> htsPost2 = new HTTPSecureSocket htsPost2.SetPostContent(strTest, "application/atom+xml") htsPost2.SetRequestHeader("Content-length", Trim(ChVarToQt (strTest.LenB))) htsPost2.SetRequestHeader("Authorization", "GoogleLogin " + strAuthenticationToken) strResponse = htsPost2.Post("http://www.google.com/calendar/feeds/ default/private/full" + "?" + strGSessionId, 100) After running this code, strResponse = "Response contains no content type" I tried adding this line of code: htsPost2.SetRequestHeader("Content-type", "application/atom+xml") But then I get: "content-type is not allowed in prolog" Please help --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data 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-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
