views:

65

answers:

0

Hi

I'm working with google app application. Actually i want to the access another id without using password for that i used OAuth its working well. But i cant able to share the particular person calendar.I tried the following code

GoogleOAuthParameters oauthParam=new GoogleOAuthParameters();
oauthParam.setOAuthConsumerKey("xxxx.com");
oauthParam.setOAuthConsumerSecret("xxxxxxxxxxxxxxxxxxx");
oauthParam.setScope("http://www.google.com/calendar/feeds/");
URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/owncalendars  [email protected]");
CalendarService service=new CalendarService("calendar");
service.setOAuthCredentials(oauthParam,new OAuthHmacSha1Signer());
AclEntry entry = new AclEntry();
entry.setScope(new AclScope(AclScope.Type.USER,"any.user"));
entry.setRole(CalendarAclRole.READ);
AclEntry insertedEntry = service.insert(feedUrl, entry);

for this code i got the error as

com.google.gdata.util.InvalidEntryException: Bad Request
Calendar entry does not contain title

 at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:558)
 at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)

plz anyone help me.

Thanks in Advance Regards sharun