The Google Plus Plugin for Grails provides utilities that provide a more rich and coherent experience while interacting with the Google Plus API. Using this plugin to access the Google Plus API you get Custom Built and highly enriched Objects as compared to the traditional Google Plus API calls than return some JSON content.
The plugin provides 2 core features to the developer
1) It allows you to generate an Access Token that is required for accessing the Google Plus API
2) It provides Highly Enriched Objects as compared to traditional JSON content when accessing the API directly.
Configure these plugin attributes in Config.groovy
First register your Application at https://code.google.com/apis/console
1) Generating an Access Token
First redirect the user to Google Server with required permissions(scope) using the Url generated by the method
This method call utilizes variables defined in your Config.groovy
grails.plugins.googlePlus.clientId grails.plugins.googlePlus.clientSecret grails.plugins.googlePlus.scope
This would generate a code that is further processed to give you an Access Token. The access token can then be accessed anytime via a call to the method
Once the access token has been received, a callback action and controller is required to send the request back to the application. These values are provided via the below config variables
2) Google Plus Api Calls
Calls to the Google Plus API via this plugin would return Groovy Objects corresponding to the data queried. For example googlePlusServie.getCurrentProfile() would give you a Groovy Object of class Person containing info about that person.
Last edited by Vishal-Sahu,