getting username from $_SESSION['oauth_token']

165 Views Asked by At

I am using photbucket API.I am using it with PHP.On my webpage when I click on login the page redirects to api.photobucket.com where the user enter username and password then he is redirected back to index.php.I want to get the username from which the username has login during the login process.I only have the $_SESSION['oauth_token'] variable.Can anybody tell me how to get username from that on any other way?

2

There are 2 best solutions below

1
On

Have you tried $_SESSION['username']?

0
On

You'll need to exchange the request token that took you to the apilogin/login page for an access token. In the response of the access token will be the username.