Class: OmniAuth::InstagramGraph::LongLivedToken
- Inherits:
-
OAuth2::AccessToken
- Object
- OAuth2::AccessToken
- OmniAuth::InstagramGraph::LongLivedToken
- Defined in:
- lib/omniauth/instagram-graph/long_lived_token.rb
Constant Summary collapse
- TOKEN_REFRESH_PATH =
'/refresh_access_token'
Instance Method Summary collapse
Instance Method Details
#refresh!(params = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/omniauth/instagram-graph/long_lived_token.rb', line 8 def refresh!(params = {}) = { token_url: TOKEN_REFRESH_PATH, } refresh_client = OmniAuth::InstagramGraph::LongLivedClient.new(client.id, client.secret, ) params[:grant_type] = 'ig_refresh_token' params[:access_token] = token refresh_client.get_token(params) end |