开发者

Google Calendar

I'm developing one web application project using java for education industry.In this Admin have all rights to access the google services of other users like A,B,C..... for this is use OAuth.Then i tried Admin want to share user A's calendar to user B using OAuth.But i got stuck in thi开发者_StackOverflow社区s step. Is it possible Plz Help me

Thanks Regards Sharun


I believe you want to use Access Control Lists (ACLs), see the docs. The Java example code at this URL for the task you mention is pretty simple:

AclEntry entry = new AclEntry();
entry.setScope(new AclScope(AclScope.Type.USER, "jdoe@gmail.com"));
entry.setRole(CalendarAclRole.READ);

URL aclUrl =
  new URL("http://www.google.com/calendar/feeds/jo@gmail.com/acl/full");

AclEntry insertedEntry = service.insert(aclUrl, entry);

and what it does is, and I quote:

This code allows jdoe@gmail.com to have read-only access to jo@gmail.com's calendar.

There's more where this came from (e.g., upgrading a user's role in an ACL above the read-only access granted in this example), and I think it's a good idea to read the whole page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜