我的 google+ api 代码正在运行。突然我在下一行得到一个错误。任何帮助表示赞赏。
if (isset($_SESSION['access_token'])) {
$client->setAccessToken($_SESSION['access_token']);
}
错误信息如下
Warning: json_decode() expects parameter 1 to be string, array given in /opt/bitnami/apache2/htdocs/goo/src/auth/apiOAuth2.php on line 142 Fatal error: Uncaught exception 'apiAuthException' with message 'Could not json decode the access token' in /opt/bitnami/apache2/htdocs/goo/src/auth/apiOAuth2.php:144 Stack trace: #0 /opt/bitnami/apache2/htdocs/goo/src/apiClient.php(186): apiOAuth2->setAccessToken(Array) #1 /opt/bitnami/apache2/htdocs/goo/googlep.php(1196): apiClient->setAccessToken(Array) #2 {main} thrown in /opt/bitnami/apache2/htdocs/goor/src/auth/apiOAuth2.php on line 144