Are there anyway to retrieve user profile from twitter API

4 views
Skip to first unread message

xhe

unread,
Mar 3, 2010, 11:56:46 AM3/3/10
to Twitter Development Talk
I now want to enable user to link their twitter account to our
website, that means, after OAuth, twitter will forward user to my
website, and then I want to retrieve that user's profile, such as
twitterId, name..., and prefill the form for user to register.
This steps is pretty straightforword, just like any other social
websites, such as linkedIn, myspace. But I didn't realize that after
Oauth step, I am lost in finding a suitable API to retrieve that
user's profile.
I would like to use this one,
http://api.twitter.com/1/users/show.format
But this API require the userID or screenName, that is what I don't
have.
So question is: how to retrieve the userId or screen name and other
profile information for the user?
Thanks

Thomas Woolway

unread,
Mar 4, 2010, 5:21:38 AM3/4/10
to twitter-deve...@googlegroups.com
When you get the access token back from Twitter after the OAuth step, it should also include some basic user information - including the user id, from memory.

Hope this helps,

Tom

Scott Wilcox

unread,
Mar 4, 2010, 4:32:48 AM3/4/10
to twitter-deve...@googlegroups.com
Are you using any libraries for the Oauth calls?

Raffi Krikorian

unread,
Mar 4, 2010, 9:58:11 AM3/4/10
to twitter-deve...@googlegroups.com
you should get some additional information on the oauth request that you could use to call users/show.  however, also, if you were to call


for example, without the username in the URL, but do it using auth (sign the request using oauth), then twitter should guess who you are from that and return the data.
--
Raffi Krikorian
Twitter Platform Team
http://twitter.com/raffi
Reply all
Reply to author
Forward
0 new messages