Fatal error: Class 'OAuth' not found in

前端 未结 4 1819
别跟我提以往
别跟我提以往 2021-02-08 03:28

I\'m trying to connect to the LinkedIn API but everytime I try to access it I get the following error:

Fatal error: Class \'OAuth\' not found in /home/vh

4条回答
  •  忘掉有多难
    2021-02-08 03:58

    OAuth is a PECL extension it must be compiled into PHP or compiled as an extension.

    • http://us3.php.net/manual/en/oauth.installation.php
    • http://pecl.php.net/package/oauth

    Most servers will not have it by default since it really is not something everyone would likely use. You can ask your host to either install it or if you have the ability compile it on server if using CGI as I did. If you run phpinfo(); and look for the word OAuth it will show up if you have it, otherwise you don't.


    Update: Use https://github.com/Lusitanian/PHPoAuthLib instead of a PECL.

提交回复
热议问题