Skip to content

Google API client wrapper, focused on the OAuth of Google+ for Kohana 3.3

Notifications You must be signed in to change notification settings

lexakozakov/googleapi-kohana

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google API for Kohana 3.3

Google API client wrapper, focused on the OAuth of Google+ (+ User info) for Kohana 3.3

Usage

  1. Create the folder in APPPATH/cache the folder Google_Client and set it writeable
  2. Copy the file modules/googleapi/config/googleapi.php to APPPATH/config/googleapi.php, and configure your app ID, secrets, developer key, etc. Don't make modifications inside the file under modules folder
  3. Add this module to your bootstrap
  4. On your code, check if your user has already permitted the app, using GPlus::instance()->getUser().
  5. If not, send the user to GPlus::instance()->client->createAuthUrl(), preferably in a popup window
  6. The getUser() method returns a Google_Person class, that has a lot of info about the user, BUT his email. To get his email, you need to use getUserinfo()->email

More info about the library and it's capabilities check Google API PHP Client documentation

Checkout as well

Check the other libraries with similar "sign in with" for Facebook and Twitter

About

Google API client wrapper, focused on the OAuth of Google+ for Kohana 3.3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%