Categories
Coding Zend Framework

Using Zend Framework to update Twitter

I was reading a post over on Mashable about the most popular twitter clients and I found it somewhat fascinating.  As of the somewhat recent Zend Framework 1.7 release, there was a new service added. Zend_Service_Twitter  – which gave me a few ideas on what to do with my own twitter account and actually feed it some information.

One thing I’m going to do, is with the new rewrite of pileofcrap.org is to have users be able to auto-update their twitter when they post a new article or photo to their highly improved PoC Blog thing.  Thanks to Zend it’s pretty simple:

$twitter = new Zend_Service_Twitter($user, $pass);
$twitter->status->update('This is my new update');

And it’s done.  Used in conjunction with tinyurl or is.gd’s APIs I can automatically do micro-updates to twitter and have all the followers of all my users automatically be notified of the new content.  It’s pretty slick, huh?

Maybe someday pileofcrap.org can be on the top client list.

By Darryl Clarke

random text goes here, i guess