フォームが4つあります。GoogleスプレッドシートAPIとコードネイター
今は$ _POSTにデータがあります。そして私はAPIを使ってGoogle Spreadsheetに入れたいと思っていますが、コードを理解するにはあまりにも初心者です。
GoogleクライアントAPIをcodeigniterに置くだけで、使用方法はわかりませんそれ。
私のコードは次のようになり..
$this->load->library('google');
$values = array(
array(
$this->input->post('name'),
$this->input->post('email'),
$this->input->post('reason'),
$this->input->post('mobile'),
date('Y-m-d')
)
);
$body = new Google_Service_Sheets_ValueRange(array(
'values' => $values
));
// $params = array(
// 'valueInputOption' => $valueInputOption
//);
$result = $this->google->spreadsheets_values->update("1gg8rHsKM3DhMaJVY-YexQyggAoq1pUCB5LpP5NFah8A", "Sheet1!A2:E2", $body, "");
をである私は、PARAMが意図されるかわからないので、私は空白のままに...
私はこのコードを実行すると、エラーMessage: Undefined property: Google::$spreadsheets_values
を取得します