This may actually be an old topic and I've not found an answer that
worked for me.

What I have is an account on Google Applications for Domains where I
have a personal calendar and a second "company" public calendar.  The
calender is marked shared.  When i try to insert a calendar item after
authentication I get a "Feed is read only" response.

I have tried using both the public and private XML Urls provided for
the calendar (from the Calendar settings) with no difference.  My code
( for testing ) does a query of the calendar prior to trying to do the
insert and the query works without error/exception.

The basic insert code looks like the following (where the
calendarPublicURI is the URL from the site...tried both public and
private as I said previously and the userName and passWord are set
properly for my account)

CalendarService service = new
CalendarService("MeetingworksCalendarApp");
service.setUserCredentials(userName, passWord);

EventEntry newEntry = new EventEntry();
newEntry.Title = new AtomTextConstruct();
newEntry.Title.Text = "API Entered Event";
newEntry.Content.Content = "See if I can add an event to the
schedule.";

AtomPerson author = new AtomPerson(AtomPersonType.Author,"Me");
author.Email = "[EMAIL PROTECTED]";
newEntry.Authors.Add(author);

DateTime startTime = DateTime.Now.AddHours(1);
DateTime endTime = startTime.AddHours(2);
When eventTimes = new When();
eventTimes.AllDay = false;
eventTimes.StartTime = startTime;
eventTimes.EndTime = endTime;
try
{
     AtomEntry insertedEntry = service.Insert(calendarPublicURI,
newEntry);
}
catch (GDataRequestException ex)
{
     MessageBox.Show(ex.ResponseString);
}

I'm obviously not doing something properly here. Any pointers would be
helpful.

Thanks


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