Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yahoo oauth refresh access token in Ruby ? #20

Open
austymenko opened this issue Oct 4, 2010 · 1 comment
Open

Yahoo oauth refresh access token in Ruby ? #20

austymenko opened this issue Oct 4, 2010 · 1 comment

Comments

@austymenko
Copy link

Hi, does anybody have a Ruby code that incorporates Yahoo oauth token refreshment described at http://developer.yahoo.com/oauth/guide/oauth-refreshaccesstoken.html ?

thanks,
Alex

@austymenko
Copy link
Author

Finally, I came up with solution to get fresh yahoo oauth token, here we go:

consumer = OAuth::Consumer.new(api_key,
shared_secret,
{
:site => "https://api.login.yahoo.com",
:request_token_path => "/oauth/v2/get_request_token",
:access_token_path => "/oauth/v2/get_token",
:authorize_path=> "/oauth/v2/request_auth"
})

request_token = OAuth::RequestToken.new(consumer, token, token_secret)
token = OAuth::Token.new(original_access_token, oauth_token_secret)
refreshed_access_token = request_token.get_access_token(:oauth_session_handle=>session_handle, :token=>token)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant