Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Cal Evans' Blog:
Accessing Twitter via Zend_Service_Twitter
Jan 25, 2011 @ 18:08:49

In this new post to his blog Cal Evans talks about a project he was working on that needed to interface with Twitter via their API. This, of course, requires OAuth but his script is all backend and Twitter requires a frontend to allow the application access.

There is no front end at all. It just collects info and stores it in a database so I can query it later. (I'm an old-school database guy and love just writing ad-hoc queries to see what I can see) Twitter wants to redirect you to a site once you have authorized access. Since I don't actually have a site to redirect it to, this was a problem.

His solution ("in two parts") involves tips from two different blog posts - this tutorial from Michelangelo van Dam and the other from Jaisen Mathai about using OAuth with Twitter. He's not releasing the source for his script just yet, though, so you'll have to do a little research on your own.

tagged: twitter zendservicetwitter problem oauth api secret key

Link:

Michelangelo van Dam's Blog:
Single User Zend_Service_Twitter
Oct 04, 2010 @ 18:36:21

Michelangelo van Dam has a new post to his blog today with an example of using the Zend_Service_Twitter component of the Zend Framework to set up a simple Twitter client to connect and grab the latest tweets from an account.

Although the Zend Framework manual extensively describes how to set up a true Twitter application with the new OAuth implementation of Twitter using Zend_Service_Twitter and Zend_Oauth (since ZF-1.10.0), this is not what you're looking for. You need a simple approach, using the single user OAuth implementation of Twitter.

He shows (complete with screenshots) how to register for access to the Twitter API and how, once you've grabbed your access tokens, to pull the latest tweets from the selected account - complete with a code sample to show you how. It's a Zend Framework-specific example, but the components can be used outside the framework for the same effect.

tagged: zendservicetwitter fetch tutorial

Link:

Raphael Stolt's Blog:
Utilizing Twitter lists with Zend_Service_Twitter
Feb 05, 2010 @ 14:14:44

Raphael Stolt has a new post to his blog today looking at how you can use the Zend_Service_Twitter component of the Zend Framework to work with the lists on Twitter.

While debating some use cases for an event registration application I stumbled upon an interesting feature, which adds participants automatically to a Twitter list upon registration. [...] This post will show how this feature can be implemented by utilizing the Zend_Service_Twitter component, and how it then can be used in a Zend Framework based application.

The Zend_Service_Twitter component makes it simple to interact with Twitter's API and calling the lists part of the API is a snap. His script first checks to see if a list exists, creates it if it doesn't and will add a user to it when they're registering. The class also includes the usual delete and modify functionality for both the users in the list and the lists themselves.

He finishes with a simple form that uses his interface class to take in the person's twitter username and send it off to the service.

tagged: twitter list tutorial zendframework zendservicetwitter

Link:

Developer.com:
Integrating Twitter Into the Zend Framework
Jan 23, 2009 @ 16:25:56

Developer.com has a new tutorial about merging two popular pieces of technology, the Zend Framework and Twitter, in a Zend Framework-based application. The key to it all? The Zend_Service_Twitter component!

What if you wanted to create your own client, or integrate your Twitter stream into your blog or website? Indeed, if your main goal in starting a Twitter account is to post messages regarding a specific product, service, or organization, it might be most convenient to integrate an update mechanism into your existing content management system.

You'll already need to be a little bit familiar with setting up Zend Framework applications to follow along exactly, but they give you a good idea of what you'll need to do outside a framework app too. They load up the Zend_Service_Twitter component, load in the config and makes a call to get the user timeline. The results of this are passed out to a view and looped through to drop them into a table. Check out this image for an example of how it would look.

tagged: twitter zendframework integrate tutorial zendservicetwitter

Link:


Trending Topics: