The arc90 lab is the playground of arc90 - a New York-based technology and strategic consulting firm. The lab is a place for us to share our ideas, tools and the occasional experiment in web technology. All ideas, experiments and tools are licensed under Creative Commons.

licensed under creative commons

This site is licensed under a Creative Commons Attribution 2.5 License.

Tools

PHP Twitter API Client

I've been having some fun with Twitter lately.

Twitter's direct messaging feature is great for automated messaging tasks. With SMS and IM forwarding, I can receive critical updates from a server (or my coffee pot... or whatever) just about anywhere. Good times!

In need of Twitter's services for a recent side project, I thought it would be nice to have a simple easy-to-use Twitter client that fit in with our existing libraries.

Feedback is definitely welcome. Feel free to email me at mattw@arc90.com with questions, comments or suggestions or post your comments over at the Arc90 blog.

Happy Twittering!


What is this?

The Arc90_Service_Twitter class makes HTTP requests to the Twitter API using cURL.

How Do I Use It?

To use Arc90_Service_Twitter in your PHP project, just follow these simple steps:

Download The Code

Click on the icon below to download the source code:

Download

The file, Arc90_Service_Twitter.zip, contains the source, usage instructions and phpDoc generated documentation.

Add the code to your PHP project

You'll need to add the contents of the 'lib' folder (the 'Arc90' folder and its contents) to your include path.

Create an Arc90_Service_Twitter API client with a valid Twitter username and password

Arc90_Service_Twitter returns an Arc90_Service_Twitter_Response object containing the requested data and all of the HTTP metadata recorded by cURL

Data may be requested in any format supported by Twitter (XML, JSON, and sometimes RSS and ATOM). The default type is JSON.

Documentation

Review the complete documentation for a full list of all functions available with Arc90_Service_Twitter.

Licensing

This arc90 tool is licensed under a BSD license.

Discuss Arc90_Service_Twitter

You can offer feedback on Arc90_Service_Twitter at the arc90 blog.

Digg Del.icio.us