David Laird
David Laird

Reputation: 11

import google skd in cakephp 2

I'm a bit new to cakephp and I'm struggling to find a good tutorial which explains how to import the Google PHP SDK into my cakephp 2 project.

I only want to use the Google+ bit to allow users to authenticate with Google. I've downloaded the SDK from https://github.com/google/google-api-php-client and placed the src folder inside a Google Folder in the Vendor Folder. So like this: app/Vendor/Google/src/...

Then in my controller I try to load the class using:

App::import('Vendor','Google');
$client = new Google_Client();

I have tried a bunch of other variations which I've found online but I believe they are old because the folder structure of the SDK is different.

Can anyone please tell me how I can include it properly.

thanks

Upvotes: 0

Views: 194

Answers (1)

FoxVSky
FoxVSky

Reputation: 119

You can try require .'path_to_google_sdk/autoload.php';

Upvotes: 0

Related Questions