Jabir Hussain Turi
Jabir Hussain Turi

Reputation: 51

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.

Upvotes: 1

Views: 532

Answers (1)

Rikin Prajapati
Rikin Prajapati

Reputation: 1943

Change constructor as shown below:

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

Upvotes: 4

Related Questions