Monthly Archive for February, 2011

Php Zend framework connection with Twitter (Oauth)

After a lot of puzzling with a connection to twitter to put a post on my wall, I thought of writing it down so that I never have to puzzle with this again!

After making a Twitter account and an application on

You need 2 actions in you Controller. The first one that you call asks for allowing the connection:

The second action is the callback, that reads the token that you get when you allow the twitter access. This token we will save in a database for further usage.

In my example I have an IndexController with 2 actions named: indexAction() and callbackAction().
The url of the page is “” and my callback url is “”.
You need to specify this in your twitter app settings. You go to your app that you can find on and change the settings with your url and your callback url.

Now we can start in our Zend Framework.
Continue reading ‘Php Zend framework connection with Twitter (Oauth)’

Post to Twitter