2

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?

Sharpzain120
  • 365
  • 3
  • 9
  • 18

2 Answers2

0

Have you tried $_SESSION['username']?

Artem Kalinchuk
  • 6,502
  • 7
  • 43
  • 57
  • 1
    If you call `http://photobucket.com/apilogin/login?oauth_token=TOKEN` it should respond with key/value pairs and `username` is one of them. You can read more about it at [Logging In API Docs](http://pic.photobucket.com/dev_help/WebHelpPublic/Content/Examples/Logging%20In.htm) – Artem Kalinchuk Oct 21 '11 at 18:14
0

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.

Justin
  • 5,029
  • 1
  • 21
  • 21