我尝试使用php中的google api class从Google Analytics中获取数据。 我检查了serval谷歌小组,发现错误来自大部分时间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 />