Implementing Oauth2 login, Fatal error: Class 'Google_Service' not found

后端 未结 8 1411
情书的邮戳
情书的邮戳 2020-12-06 03:02

I am updating my website\'s login system from LightOpenID to Google\'s Oauth 2.0.

When I require the Client.php and the Service/Oauth2.php I get an error

8条回答
  •  不知归路
    2020-12-06 03:26

    Make sure you add the line BEFORE any other Google "require_once" lines.

    require_once 'google-api-php-client/autoload.php';
    

    I had it last and it had me scratching my head for a good 10 minutes.

提交回复
热议问题