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

后端 未结 8 1412
情书的邮戳
情书的邮戳 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:35

    The new way of doing this (circa early 2016) is

    require_once("Google/autoload.php");
    

    (Assuming you have already set your include path to have /path/to/google-api-php-client/src)

提交回复
热议问题