In this blog post I'm going to a explain how you can use the Twitter API in a CakePHP application using webservices.
The implementation of the Twitter API is provided by our Twitter webservices plugin. It not only supports the regular API methods but even allows you to use their statuses streaming API.
To start you will need to install the plugin using Composer:
composer require cvo-technologies/cakephp-twitter
This will automatically install the Webservices plugin which provides the integration with CakePHP.
Now you will need to enable the two plugins. If you're already using a webservice implementation in your project then you will only need to load our Twitter implementation and not the Webservice plugin itself.
bin/cake plugin load Muffin/Webservices --bootstrap
bin/cake plugin load CvoTechnologies/Twitter
Add the following to your
Datasources section of your application's config.
Make sure to change the
oauthSecret can be left empty.
This is how you can use the implementation in a controller.