I found useful infomation from this thread
http://groups.google.com/group/google-calendar-help-dataapi/browse_thread/thread/7a8709c3ab7c2af3/#
Now I successed in adding one into another user's calendar.
But one more thing, I tried to build a proxy server communicated with
google calendar with Java client. So maybe it was not an Web app which
can use the AuthSub. Then my question is that is there a way to change
the sharing setting by my proxy when one decide to add an event to
others' calendar?
Thanks,
Jacky
On 4月11日, 下午12时10分, "Jacky.S" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm building a proxy server which has communition with google
> calendar. I would like to add an event to another user's calendar. For
> example, after I set user credential, I can create an event under my
> calendar. But is there a way that I can create this event under
> another user's calendar? And I have tried this code:
>
> CalendarEventEntry myEntry = new CalendarEventEntry();
>
> myEntry.setTitle(new PlainTextConstruct("Tennis with Beth"));
> ...
>
> Person author = new Person("Jacky.Seraph Mun", null,
> "[EMAIL PROTECTED]");
> myEntry.getAuthors().add(author);
>
> CalendarEventEntry insertedEntry = null;
> try {
> insertedEntry = calendarService.insert(postUrl, myEntry);
> } catch (IOException e) {
> e.printStackTrace();
> } catch (ServiceException e) {
> e.printStackTrace();
> }
>
> Note that the author Jacky is not the actual user that is about to
> insert the new event. And after the insertedEntry was returned, I
> found that the author was not the Jacky but was still the user who
> request this service.
>
> Could anyone help me?
>
> Thanks,
>
> Jacky
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google 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-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---