Google日历Api会出现致命错误

时间:2014-02-26 07:59:44

标签: php api google-calendar-api

我想将我的网站上的活动插入Google calender,我已经下载了Google Calender API但无法运行的示例。

错误:

Fatal error: Uncaught exception 'Google_Service_Exception' with message 'Error calling GET https://www.googleapis.com/books/v1/volumes?q=Henry+David+Thoreau&filter=free-ebooks&key=%3CYOUR_API_KEY%3E: (400) Bad Request' in D:\xampplite\htdocs\calendar\src\Google\Http\REST.php on line 80

Google_Service_Exception: Error calling GET https://www.googleapis.com/books/v1/volumes?q=Henry+David+Thoreau&filter=free-ebooks&key=%3CYOUR_API_KEY%3E: (400) Bad Request in D:\xampplite\htdocs\calendar\src\Google\Http\REST.php on line 80

我已配置config.php (application_name, client_id, client_secret, redirect_uri, developer_key)但仍收到上述错误消息。

此外,Calendar API中的Google console状态也已开启。我做错了什么。?

由于

2 个答案:

答案 0 :(得分:0)

之前我遇到过同样的问题.. 您是否允许使用google calender api中的google developer's console

https://cloud.google.com/console/project/315157837873/apiui/api

如果没有,请on它......

答案 1 :(得分:-1)

  • config.php保持原始状态无变化。
  • 确保simple-query.php中使用的第一个是“服务器密钥”
  • 不要改变第二个''。 “//如果API密钥未更改,则发出警告。 if($ apiKey ==''){    echo missingApiKeyWarning();  “只是留下,
相关问题