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

后端 未结 8 1407
情书的邮戳
情书的邮戳 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条回答
  •  萌比男神i
    2020-12-06 03:40

    While working with Google API integration

    Fatal error: Class 'abc' not found

    error comes when there is definitely something different between the library you have in composer.json above, and the library that is actually being auto-loaded.

    had same problem just changed in my composer.json

    {"require": {"google/apiclient": "1.0.*@beta"}}
    

    to

    {"require": {"google/apiclient": "2.0.*"}}
    

    and then execute php composer.phar update (make sure you give right path for .phar file)

提交回复
热议问题