验证令牌时Google API抛出错误

时间:2017-04-08 19:37:53

标签: php curl google-api google-signin guzzle

我一直在尝试使用Google-API进行Google登录,但是当我这样做时

// $token is set to a correct value beforehand
require_once 'inc/google-api/vendor/autoload.php';
$client = new Google_Client(['client_id' => '280452639491-s53psco36kn5cm3nitma4gpqsq9ik3ao.apps.googleusercontent.com']);
$payload = $client->verifyIdToken($token);
按照指示by google

弹出此错误:

Fatal error: Uncaught exception 'RuntimeException' with message 
'Guzzle requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.'

我的网站托管在bplaced上,使用的是PHP 5.5.21,我从https://github.com/google/google-api-php-client/releases下载了google-api-php54软件包,我需要如上所示。

0 个答案:

没有答案