On 8/11/10 10:49 PM, lucaswxp wrote:
> Hello o/
> Into now, I have caught my latest tweets that way:
>
> file_get_contents("http://twitter.com/statuses/user_timeline/
> {$username}.json?count={$number}");
>
> Actually, I used cURL, but I put that way to simplify the code.
>
> Well, with this new OAuth thing, I'm lost.
> I'm triyng to use the TwitterOAuth Lib (http://github.com/abraham/
> twitteroauth), but, I'll have to sign in every time to autenthicate
> myself? I don't understand very well...
>
> See, I know that I need:
> $connection = new TwitterOAuth(MY_CONSUMER_KEY, MY_CONSUMER_SECRET,
> $_SESSION['oauth_token'],
> $_SESSION['oauth_token_secret']);
>
> $connection->get("user_timeline/{$username}.json?count={$number}");
>
> But... I don't know where I get the "oauth_token" and
> "oauth_token_secret" (it's necessary for what I want?).
> I'll need all this just to get my latest tweets?
> Help, pls!
> (srry for the bad english)
Hello,
You can find these on http://dev.twitter.com/apps -> your application
name -> My Access Token (right menu) -> the keys.
These will only work for one account, although you can access the
timelines of other people this way - unless the account is protected.
Tom