-
-
Notifications
You must be signed in to change notification settings - Fork 191
App Access Token
nov matake edited this page Jun 15, 2012
·
1 revision
Manually get an app access token.
In this way, you can store the token in DB.
app = FbGraph::Application.new(APP_ID, :secret => APP_SECRET)
app.get_access_token
If you set app_secret and access to an endpoint which requires an app access token,
fb_graph automatically fetch an application token implicitly.
app = FbGraph::Application.new(APP_ID, :secret => APP_SECRET)
user = FbGraph::User.new('someone')
app.ban! user # Get an app access token internally
app.unban! user # Cached token (in memory) is used here. No unnecessary API request.