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

I've read and made notes on http://hueniverse.com/oauth/guide/ and
http://www.snipe.net/2009/07/writing-your-first-twitter-application-with-oauth/
but I'm missing something that must be obvious to everyone else. I'm
using Tijs Verkoyen's Twitter class.

I want to run http://classes.verkoyen.eu/twitter_oauth/docs#statusesusertimeline
to get a user's latest tweets.

The example code says:

<?php
// require
require_once 'twitter.php';

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

// set tokens
$twitter->setOAuthToken('<your-token>');
$twitter->setOAuthTokenSecret('<your-token-secret>');

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

// output
var_dump($response);
?>

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
Token

Gizza clue :-)

Cheers
J

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to