Skip to content

Extending Access Token Lifetime

nov edited this page Aug 21, 2015 · 5 revisions

Extending Access Token Lifetime

Read official FB doc to understand this feature itself.

You can use the feature in FbGraph2 as below.

auth = FbGraph2::Auth.new(FACEBOOK_APP_ID, FACEBOOK_APP_SECRET)
auth.fb_exchange_token = YOUR_SHORT_LIVED_ACCESS_TOKEN_HERE
access_token = auth.access_token!
# => instance of Rack::OAuth::AccessToken::Bearer
Clone this wiki locally