grabAccounts: Grab list of accounts

Description Usage Arguments Details Author(s) See Also Examples

View source: R/grabAccounts.R

Description

Fetches all accounts under one business ID. All accounts to which the user has access to that is.

Usage

1
2
grabAccounts(id, token, n = 100, fields = "default", verbose = FALSE,
  limit = 100)

Arguments

id

Your business.facebook.com ID or your user id.

token

A valid token as returned by fbAuthenticate or a short-term token from facebook Graph API Explorer.

n

Number of results to retrieve, defaults to 100. When you make an API request, you will usually not receive all of the results of that request in a single response. This is because some responses could contain thousands of objects so most responses are paginated by default. previous fetches the previous page of response (after the initial query) similarly next fetches the next page and NULL does not paginate (only makes one query).

fields

Defaults to default which returns name and id of accounts. See findFields to find all available fields.

verbose

Defaults to FALSE if TRUE will print information on the query in the console.

limit

Number of results requested at each API call, defaults to 100.

Details

Returns data.frame of account IDs and status. requires ads_management permission!

Author(s)

John Coene jcoenep@gmail.com

See Also

getAccount

Examples

1
2
3
4
5
## Not run: 
# get account ids
accs <- grabAccounts(id = "act_123456789012345", token = "XXXXXX")

## End(Not run)

JohnCoene/fbadsinsightsr documentation built on May 28, 2019, 12:55 p.m.