There is a "standard" PHP OAuth library, documented in the manual, and which is installed via pecl. There is no package shortcut under Ubuntu; you still have to use pecl
sudo pecl install oauth
If you get a complaint about no "phpize", install the "php5-dev" ubuntu package. And then if you get an error in "php_pcre.h" when compiling, then you need to install the "libpcre3-dev" ubuntu package.
Finally, you need to enable it. Still as root:
cd /etc/php5/conf.d
echo "extension=oauth.so" >oauth.ini
(This creates a config file just for oauth; you could also simply put the extension line in php.ini.)
Finally, "php -m" should list "OAuth", and you can create a OAuth object in your php scripts.
Ubuntu package manager lists "liboauth-php"; the minimal information, and the lack of mention of pecl, should have given me the clue that it is something different.
Also different is this: http://code.google.com/p/oauth-php/
Sunday, May 22, 2011
Subscribe to:
Post Comments (Atom)
5 comments:
Awesome! Thanks for the quick howto!
Yeah, thank you very much, that was exactly what I needed!
Hooray for you! :)
Cheers for this, I was stuck in classpath hell until I came across your post.
Saved and bookmarked!!
Thanks a TON!!
Anybody discovered what this "liboauth-php" is?
Post a Comment