OAuth Consumer in CakePHP 2.0.5

Just a quick post to note some tweaks I had to make to Daniel Hofstetter’s awesome OAuth consumer component for CakePHP to get it running in CakePHP 2.0.5

The cakephp_2.0-dev branch was throwing the following error for me when trying to use the Twitter OAuth API.

Consumer twitterconsumer.php not found!
The relevant changes are available in my cakephp2.0.5 branch on Github.


*- Rename directories to match new conventions. - Change createConsumer method to use $className rather than $fileName to fix ‘Consumer twitter_consumer.php not found!’ exception. - Use App::uses instead of App::import to fix ‘Fatal error: Class ‘HttpSocket’ not found…’ error.


Get the code


comments powered by Disqus