// Set up the HTTP transport and JSON factoryHttpTransport httpTransport = new NetHttpTransport();JsonFactory jsonFactory = new JacksonFactory();// Set up OAuth 2.0 access of protected resources // using the refresh and access tokens, automatically // refreshing the access token when it expiresGoogleAccessProtectedResource requestInitializer = new GoogleAccessProtectedResource(accessToken, httpTransport, jsonFactory, clientId, clientSecret, refreshToken);// Set up the main Google+ classPlus plus = new Plus(httpTransport, requestInitializer, jsonFactory);// Make a request to access your profile and display it to consolePerson profile = plus.people().get("me").execute();System.out.println("ID: " + profile.getId());System.out.println("Name: " + profile.getDisplayName());System.out.println("Image URL: " + profile.getImage().getUrl());System.out.println("Profile URL: " + profile.getUrl());
Do you have these available in a public Repo? It would be nice to have the POM file dependency entries.ThanksVinay (reversed ...)
My goodness, This is the best thing you've done !!I've been waiting for this for the past few months, the OAuth helper libraries were really indispensable !Thanks again ! :-)
Anybody got any ideas why I'm getting class not found errors when trying to use com.google.api.services.plus, like for the example above?I'm using the google-api-services-plus-v1-1.3.0-beta.jar...Which is included in the google-api-java-client-1.6.0-beta.zip. All the other classes from that zip seem to build ok.My project is a non Maven project btw.Uncaught exception from servletjava.lang.NoClassDefFoundError: com/google/api/services/plus/PlusMaybe I'm missing some dependencies? Any suggestions greatly appreciated!
Do you have these available in a public Repo? It would be nice to have the POM file dependency entries.
ReplyDeleteThanks
Vinay (reversed ...)
My goodness, This is the best thing you've done !!
ReplyDeleteI've been waiting for this for the past few months, the OAuth helper libraries were really indispensable !
Thanks again ! :-)
Anybody got any ideas why I'm getting class not found errors when trying to use com.google.api.services.plus, like for the example above?
ReplyDeleteI'm using the google-api-services-plus-v1-1.3.0-beta.jar
...Which is included in the google-api-java-client-1.6.0-beta.zip. All the other classes from that zip seem to build ok.
My project is a non Maven project btw.
Uncaught exception from servlet
java.lang.NoClassDefFoundError: com/google/api/services/plus/Plus
Maybe I'm missing some dependencies? Any suggestions greatly appreciated!