连接到 Google 分析 API
Connecting to the Google Analytics API
我正在尝试连接到 Google Analytics api。我的最终目标是自动添加一个目标,但我什至无法使用 HelloAnalytics。我遵循了明确的教程 here。
我的 require once 一开始不起作用,因为教程 link 无法找到路径。所以我不得不猜测 link 到哪些文件。我尝试了以下方法:
require_once '/classes/google-api-php/src/Google/Client.php';
require_once '/classes/google-api-php/src/Google/Service/Analytics.php';
然后我收到以下错误:
致命错误:Class 'Google_Service' 未在第 32 行 \xampp\htdocs\google-api-test\classes\google-api-php\src\Google\Service\Analytics.php 中找到 'Google_Service'
我觉得教程需要更新以匹配库。此刻我很困惑。
已解决:post: daimto.com/google-oauth2-php 的作者已回复评论。她更新了 post。现在可以了。我收到回数据。
我正在尝试连接到 Google Analytics api。我的最终目标是自动添加一个目标,但我什至无法使用 HelloAnalytics。我遵循了明确的教程 here。
我的 require once 一开始不起作用,因为教程 link 无法找到路径。所以我不得不猜测 link 到哪些文件。我尝试了以下方法:
require_once '/classes/google-api-php/src/Google/Client.php';
require_once '/classes/google-api-php/src/Google/Service/Analytics.php';
然后我收到以下错误:
致命错误:Class 'Google_Service' 未在第 32 行 \xampp\htdocs\google-api-test\classes\google-api-php\src\Google\Service\Analytics.php 中找到 'Google_Service'
我觉得教程需要更新以匹配库。此刻我很困惑。
已解决:post: daimto.com/google-oauth2-php 的作者已回复评论。她更新了 post。现在可以了。我收到回数据。