问题
I've been trying to use the Google-API for Google Sign-In, but when I do
// $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);
as instructed by google, this error pops up:
Fatal error: Uncaught exception 'RuntimeException' with message
'Guzzle requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.'
My Website is hosted on bplaced, which uses php 5.5.21 and I downloaded the google-api-php54 package from https://github.com/google/google-api-php-client/releases, which I required as seen above.
来源:https://stackoverflow.com/questions/43299560/google-api-throwing-error-when-verifying-token