views:

6

answers:

1

according to the twitter api documentation

http://dev.twitter.com/doc/get/statuses/user_timeline

accessing the current logged in users timeline does not require auth. But i'm getting a basic auth not supported response and a 401 when I debug in javascript.

anybody have experience getting the current users info?

http://api.twitter.com/1/statuses/user_timeline.json

Specifying a user works fine with

http://twitter.com/users/show.json?screen_name=example&callback=?
A: 

Accessing http://api.twitter.com/1/statuses/user_timeline.json requires authentication because it will return current logged in user's status timeline. So if you are not logged in, there will be no timeline to return.

On the other hand, twitter should return a 404 error instead of a 401.

Now, try adding a screen name: http://api.twitter.com/1/statuses/user_timeline.json?screen_name=jack, it'll work.

Ruel
thats understood. Suppose I login with my account and want to display my own tweets on my javascript test application. (wait, does it account for cookies or sessions? Lets say I logged in to twitter already in another browser window and want to use this fact in my test app.)
egfx
You need to login through the API. Even if you're logged in to the site, it'll not work. (Cookies)
Ruel
see above, I edited my comment :)
egfx
What I'm basically hoping to do is have my application display the users name if they have a Twitter cookie without having to login through my site.
egfx
Do you mean, logged in to the website? (twitter.com) or to the API?
Ruel
Twitter doesn't allow that (as far as I know), you might use a better authentication though: http://dev.twitter.com/pages/oauth_faq.
Ruel
I mean, lets say the user has a Twitter cookie or session from Twitter.com on their computer stored. Can my application take advantage of this fact and display their information on my website? If not, how do I get this information? It says in the documentation that auth is not required for this.
egfx
Nope, the user must verify your application first, before your application can gather any data from that user. After that, in the future it will work just the way you want to (for that single user). Same goes for the others.
Ruel
Also, the *no auth* applies for this: `http://api.twitter.com/1/statuses/user_timeline.json?screen_name=jack` only.
Ruel
hmm interesting. Cool, I think I have a workaround.
egfx