how to obtain a username from oauth key in twitter

api, oauth, php, twitter

Solution

Use the verify credentials call method call. http://twitter.com/account/verify_credentials.xml

Problem

I am working with twitter's oauth, and ive run into a weird problem. How do i get a user's profile information using just their token and secret? Here is what im using now ``` function OauthGetProfile($consumerkey, $consumersecret, $oauthtoken, $oauthsecret){ $to = new TwitterOAuth($consumerkey, $consumersecret, $oauthtoken, $oauthsecret); $content = $to->OAuthRequest('http://twitter.com/statuses/user_timeline.xml', array('count' => '50'), 'GET'); return $content; } ``` Im not sure how to get this, the api calls to get your profile require you specify the persons profile, which i need their ID to do.

Original source