目的のワークシートからデータを抽出する方法をユーザーに提供する Web アプリケーションを作成しようとしています。
背景
- ユーザーは、自分の Google アカウントの 1 つを選択した後、Oauth2 を使用して自分のアプリケーションに接続します。
- 私のアプリケーションは、( ZendGdataSpreadsheets ' クラスからgetSpreadsheetFeed()のメソッドを使用して) 彼のスプレッドシートを 1 つずつ取得し、それらを表示します。
- ユーザーは自分のスプレッドシートの 1 つを選択します。
- 私のアプリケーションは、スプレッドシートの各ワークシートを取得するために、選択したスプレッドシートの ID を取得します。同時に、取得したこれらすべてのワークシートを表示します。
- ユーザーは、使用可能なワークシートの 1 つを選択します。
- 私のアプリケーションには、スプレッドシートの ID とワークシートの ID があり、作業することができます。しかし、 getListFeed()のメソッドを使用しようとするとエラーが発生します。
関連コード
$query = new Zend_Gdata_Spreadsheets_ListQuery();
$query->setSpreadsheetKey($ssKey);
$query->setWorksheetId($wsKey);
$listFeed = $ssService->getListFeed($query); // Where the error occurs
$ssKeyと$ wsKeyの両方を$_POST から取得します。
エラー
Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message ' in *****\Zend\Gdata\App.php on line 714
Zend_Gdata_App_HttpException: Expected response code 200, got 400 Invalid request URI in *****\Zend\Gdata\App.php on line 714
追加情報
var_dump($クエリ)
object(Zend_Gdata_Spreadsheets_ListQuery)[11]
protected '_defaultFeedUri' => string 'https://spreadsheets.google.com/feeds/list' (length=42)
protected '_visibility' => string 'private' (length=7)
protected '_projection' => string 'full' (length=4)
protected '_spreadsheetKey' => string 'https://spreadsheets.google.com/feeds/spreadsheets/*KEY*' (length=74)
protected '_worksheetId' => string 'https://spreadsheets.google.com/feeds/worksheets/*KEY*/private/full/od6' (length=89)
protected '_rowId' => null
protected '_params' =>
array (size=0)
empty
protected '_url' => null
protected '_category' => null
$query->getQueryUrl()
https://spreadsheets.google.com/feeds/list/https://spreadsheets.google.com/feeds/spreadsheets/*KEY*/https://spreadsheets.google.com/feeds/worksheets/*KEY*/private/full/od6/private/full
さらに情報が必要な場合は、お知らせください。
前もってありがとう、
セドリック。