Learn R Programming

Rfacebook (version 0.6.15)

getPageToken: Get a page access token

Description

Gets a page access token that can be used to e.g. get insights for a page.

Usage

getPageToken(page, token)

Arguments

page
A page ID or page name.
token
the token (with scope 'manage_pages') of a user that has admin access to the page

Value

the page access token string

Examples

Run this code
## Not run: ------------------------------------
# ## Get a normal access token with manage_pages scope
# token = fbOAuth(app_id, app_secret, scope="manage_pages")
# ## Get a page access token for a page
# page_token = getPageToken(page, token)
# ## Get page insights
# getInsights(page, token=page_token, metric = "page_impressions")
## ---------------------------------------------

Run the code above in your browser using DataLab