Guys, I'm getting very confused moving to OAuth.

I've read and made notes on and
but I'm missing something that must be obvious to everyone else. I'm
using Tijs Verkoyen's Twitter class.

I want to run
to get a user's latest tweets.

The example code says:

// require
require_once 'twitter.php';

// create instance
$twitter = new Twitter('<your-consumer-key>', '<your-consumer-

// set tokens

// get users timeline
$response = $twitter->statusesUserTimeline();

// output

but that just looks like you provide everything .. two pairs of
authentication codes. Is that right? So my consumer key and secret
come from registering the app with twitter, and the token and token
secret come from when you authorize the app to use your Twitter
account, right, and they come back as GET parameters. I did that
probably a few months ago and can't see to re-do that process, is that
the problem? If I try to re-run that I get "Woah there! This page is
no longer valid. It looks like someone already used the token
information you provided. Please return to the site that sent you to
this page and try again … it was probably an honest mistake."

Anyway, I'm trying the code above and getting back Invalid / expired

Gizza clue :-)


Twitter developer documentation and resources:
API updates via Twitter:
Issues/Enhancements Tracker:
Change your membership to this group:

Reply via email to