Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pocesar/googleapi-kohana
Google API client wrapper, focused on the OAuth of Google+ for Kohana 3.3
https://github.com/pocesar/googleapi-kohana
Last synced: 17 days ago
JSON representation
Google API client wrapper, focused on the OAuth of Google+ for Kohana 3.3
- Host: GitHub
- URL: https://github.com/pocesar/googleapi-kohana
- Owner: pocesar
- Created: 2013-05-26T22:24:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-16T22:03:09.000Z (about 7 years ago)
- Last Synced: 2024-10-18T06:28:43.590Z (27 days ago)
- Language: PHP
- Size: 358 KB
- Stars: 10
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Google API for Kohana 3.3
================Google API client wrapper, focused on the OAuth of Google+ (+ User info) for Kohana 3.3, but works for all the other services Google has to offer
### 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](https://developers.google.com/api-client-library/php)
### Checkout as well
Check the other libraries with similar "sign in with" for [Facebook](https://github.com/pocesar/facebook-kohana) and [Twitter](https://github.com/pocesar/twitter-kohana)