I want to manipulate Google Spreasheet in my application (in php), so, to do this, I want to use the google docs api with the zend gdata librairy.
I take this code in the zend sample docs but I get an error 500:
$_SESSION['docsSampleSessionToken'] = Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']);
$client = Zend_Gdata_AuthSub::getHttpClient($_SESSION['docsSampleSessionToken']);
$gdClient = new Zend_Gdata_Spreadsheets($client);
$feed = $gdClient->getSpreadsheetFeed();
$currKey = explode('/', $feed->entries[0]->id->text);
$query = new Zend_Gdata_Spreadsheets_DocumentQuery();
$query->setSpreadsheetKey($currKey);
$feed = $gdClient->getWorksheetFeed($query);
When I remove this line, all work fine:
$feed = $gdClient->getWorksheetFeed($query);
My error is "wrong scope" and my scope during the authentification is http://spreadsheets.google.com/feeds/spreadsheets/ (like the sample).
How to resolve this error ?