简体   繁体   中英

Google calendar api v3 - undefined constructor error

I have got an access-token for Calendar API can't figure out how to use this token to manipulate the calendar.

I have already read their documentation and getting started guide but still need help. I used following code to create calendar service:

Calendar service = new Calendar(httpTransport, accessProtectedResource, jsonFactory);
service.setApplicationName("YOUR_APPLICATION_NAME");

but it says:

The constructor Calendar(HttpTransport, GoogleAccessProtectedResource, JacksonFactory) is undefined.

Change constructor as shown below:

Calendar service = new Calendar(httpTransport, 
                                jsonFactory, 
                                accessProtectedResource);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM