You need to POST to the comment feed url.

http://www.google.com/calendar/feeds/userID/visibility/full/eventID/comments

Also, do you know that the comments are not included in a full feed?
To see comments, you need to request either the comment feed url, or a
composite feed.

I just created an event through the UI and added and comment, also
through the UI. Once I had that, I requested the comment feed for my
new event, and saw the original comment. Then I was able to
successfully POST an number of comments to the comment feed url.

The full xml that I posted was:

<entry xmlns="http://www.w3.org/2005/Atom";>
<content type="html">Hello</content>
<author><name>Calendar
Maven</name><email>[email protected]</email></author>
</entry>

This comment appears in the comment feed and in the UI. If you don't
make the content type="html" then the content does not appear in the
UI. I'm not sure why that is.

Ray


On Mon, Feb 2, 2009 at 6:47 PM, Dag <[email protected]> wrote:
>
> How do you do the POST? I tried adding this function
>
> function postwith(to,p) {
>  var myForm = document.createElement("form");
>  myForm.method="post" ;
>  myForm.enctype = "application/atom+xml";
>  myForm.action = to ;
>  for (var k in p) {
>    var myInput = document.createElement("input") ;
>    myInput.setAttribute("name", k) ;
>    myInput.setAttribute("value", p[k]);
>    myForm.appendChild(myInput) ;
>  }
>  document.body.appendChild(myForm) ;
>  myForm.submit() ;
>  document.body.removeChild(myForm) ;
> }
>
> but that won't change the enctype.
>
> I tried to call POST on the google.gdata.calendar.CalendarService
> object but it isn't supported.
>
> Also I tried:
> var feed = feedRoot.feed;
> var entries = feed.entry;
> console.log('entries length', entries.length);
> console.log(entries[0].getId().getValue());
> console.log(entries[0].getContent().getText());
>  //feed.insertEntry(ce, hie, herror);
> feed.addEntry(ce);
>
> And the entry was inserted into the feed but it doesn't stay in there.
> The next time I look at the feed, the added comment is gone.
> I know there is something tricky going on because none of google's
> examples are examples of adding comments.
> What is the secret?
> Thanks,
> Tim
>
>
> On Jan 31, 10:20 pm, Ray Baxter <[email protected]> wrote:
>> Yourcommentxml should look like the example 
>> here:http://code.google.com/apis/gdata/elements.html#gdComments
>>
>> Ray
>>
>> On Wed, Jan 28, 2009 at 3:39 AM, talby101
>>
>> <[email protected]> wrote:
>>
>> > Hi there I am trying to post acommentto my event using the data api
>> > but failing with a HTTP 500 error - Error addingcomment. I really
>> > wish i could RTFM but the docs are pretty scant on this one (if not
>> > please notify)...
>>
>> > (All i could find doc wise : 
>> > ttp://code.google.com/support/bin/answer.py?answer=64265&topic=10365
>> > )
>>
>> > Here is my post:
>>
>> > <atom:entry   xmlns:atom='http://www.w3.org/2005/Atom'
>> >                        xmlns:gd='http://schemas.google.com/g/2005'
>> >                        xmlns:gCal='http://schemas.google.com/gCal/
>> > 2005'
>> >                        xmlns:gAcl='http://schemas.google.com/acl/
>> > 2007'
>> >                        xmlns:batch='http://schemas.google.com/gdata/
>> > batch'>
>> > <atom:category scheme='http://schemas.google.com/g/2005#kind'
>> > term='http://schemas.google.com/g/2005#message'/>
>> > <atom:content type='text'>some text</atom:content>
>> > <atom:author>
>> > <atom:name>some name</atom:name>
>> > <atom:email>some email</atom:email>
>> > </atom:author>
>> > </atom:entry>
>>
>> > Can anyone see anything wrong with that ? My content type is
>> > application/atom+xml and method is POST.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to