On my small company's website there exists a display of 40 100px X 100px images that represent the projects that we've been involved with. We've a lot more like 150 projects, only 40 are shown on the home page and picking a the 40 is random. See Example Here.

We have an Update page which sorts these 40 projects through the date these were added. See Here.

In the two cases the information is drawn from the PHP MySQL database and displayed as so online.

We're wishing to obtain a twitter presence in addition to re-developing our website and I'm wondering:

It is possible to method to link twitter towards the update page, then when I give a new project towards the database, or update a current project it instantly tweets concerning the new project?

Thanks ahead of time

It's certainly easy to do however, since twitter switched off Fundamental Auth, you will need to setup a twitter 'app' that you will grant use of (oAuth) then use that to publish. It adds a little of complexity, however it should not prevent you.

Obviously, in case your Content management systems can offer an Feed of updates/additions (possibly according to that update page), you could utilize one of the numerous RSS to Twitter posting services.

I am a large fan of how you are able to pick and chose Zend Framework's components, so I'd most likely use [cde] for something similar to nevertheless this, the idea is comparable on any Twitter library (as well as just interfacing directly with Twitter, but that appears like unnecessary work).

First - as pointed out - you will need tosetup an application on Twitter. The developer site should help there. You'll should also **grant your brand-new application accessibility account you will be posting to, the thing you need is definitely an oAuth access token.

The access token can be used for read/write, you will employ it to create the Twitter library (again, a good example from Zend's documentation, but it ought to be much like other libraries):


Then go to whichever data the Content management systems provieds to produce the 'update' publish. Maybe something similar to this:

$twitter = new Zend_Service_Twitter(array(
  'username' => 'johndoe',
  'accessToken' => $token

Obviously you will need to make certain that's underneath the 140 limit.

It's really quite simple, the actual overhead is establishing an 'app' and becoming the oAuth token You will need a simple once script to request and retrieve the token (Zend's documentation gives good examples) Or you might request permission for xAuth, but that appears a little outrageous for the application..

One potential benefit - since you are creating an application, you're able to select the 'via AppName' that's displayed in a variety of clients.