pocesar / Googleapi Kohana
Google API client wrapper, focused on the OAuth of Google+ for Kohana 3.3
Stars: ✭ 10
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
- Create the folder in
APPPATH/cache
the folderGoogle_Client
and set it writeable - Copy the file
modules/googleapi/config/googleapi.php
toAPPPATH/config/googleapi.php
, and configure your app ID, secrets, developer key, etc. Don't make modifications inside the file undermodules
folder - Add this module to your bootstrap
- On your code, check if your user has already permitted the app, using
GPlus::instance()->getUser()
. - If not, send the user to
GPlus::instance()->client->createAuthUrl()
, preferably in a popup window - The
getUser()
method returns aGoogle_Person
class, that has a lot of info about the user, BUT his email. To get his email, you need to usegetUserinfo()->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
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].