CoffeePowered

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.

1
Consumer twitter_consumer.php not found!

The relevant changes are available in my cakephp_2.0.5 branch on Github.

Changelog

  • 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

https://github.com/Stanton/oauth-consumer-component/tree/cakephp_2.0.5

This entry was posted on Monday, January 9th, 2012 at 09:35 and is filed under CakePHP, Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

You should RSS feed icon subscribe to future posts and Twitter follow me on Twitter

One Response to “OAuth Consumer in CakePHP 2.0.5”

  1. [...] the latest version of CakePHP and 320 and up and got to work integrating with Twitter, I had to modify the OAuth Consumer component for the latest version of Cake, but with the magic of GitHub I was able to push these changes back [...]

Leave a Reply