我尝试使用php 中的google api 类从 google 分析中获取数据。我检查了 serval google groups,发现大多数时候当 Curl 关闭并且 SSL 也关闭时,错误就会出现,但我检查了 phpinfo() 并且展位正在运行。有人知道它可能是什么吗?在我的本地服务器上它正在运行,但在网络服务器上它没有运行。
<br />
<b>Fatal error</b>: Uncaught exception 'Exception' with message 'GAPI: Failed to authenticate user. Error: "Error=BadAuthentication
Url=https://www.google.com/accounts/ServiceLogin?service=analytics#Email=mail
Info=WebLoginRequired
"' in /home/express/public_html/loggedIn/gapi.class.php:418
Stack trace:
#0 /home/express/public_html/loggedIn/gapi.class.php(62): gapi->authenticateUser('mail', 'pw')
#1 /home/express/public_html/loggedIn/request.php(10): gapi->__construct('mail', 'pw')
#2 {main}
thrown in <b
>/home/express/public_html/loggedIn/gapi.class.php</b> on line <b>418</b><br />