Extending Access Token Lifetime - nov/fb_graph2 GitHub Wiki

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
⚠️ **GitHub.com Fallback** ⚠️