PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Zend Framework 101: Zend_Oauth

Summary

In this article I showed you how to use the Zend_Oauth component of the Zend Framework by implementing a basic Twitter client.

I showed you how to authenticate using Zend_Oauth_Consumer, which consisted of these main steps:

  1. Retrieve a request token from Twitter
  2. Store the request token and redirect the user to Twitter
  3. User authenticates and grants your application permission
  4. You receive an authorization token and request an access token
  5. Store the access token, then use for subsequent API calls

Additionally, I showed you some "real world" usage of some other Zend Framework components (such as Zend_Db, Zend_Session and Zend_Service_Twitter).

While this implementation was quite basic (and would need various improvements to scale to fully-featured web application), it hopefully demonstrates how simple and useful a service such as OAuth can be.

Further Reading

Other Options

In This Article