View source: R/fbGetAdAccount.R
| fbGetAdAccount | R Documentation |
Load ad account details for a specific ad account or a vector of ad account IDs from Facebook Marketing API into R.
fbGetAdAccount(
account_id = getOption("rfacebookstat.account_id"),
fields = paste0("id,name,account_id,account_status,amount_spent,",
"created_time,balance,business_name,currency,owner,",
"timezone_name,disable_reason,spend_cap"),
api_version = getOption("rfacebookstat.api_version"),
username = getOption("rfacebookstat.username"),
token_path = fbTokenPath(),
access_token = getOption("rfacebookstat.access_token")
)
account_id |
Vector of one or more Facebook Ad Account IDs (with or without 'act_' prefix). |
fields |
Character string or vector of requested fields separated by comma. Default includes basic account info, status, spend and balance. |
api_version |
Current Facebook Marketing API version. |
username |
Your username on Facebook. |
token_path |
Path to directory with credentials. |
access_token |
Your Facebook API access token. |
Data frame (tibble) with ad account details.
Alexey Seleznev
## Not run:
# Get details for a single account
acc <- fbGetAdAccount(account_id = "1090055510425474")
# Get details for multiple accounts
accs <- fbGetAdAccount(account_id = c("1090055510425474", "act_2090055510425474"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.