checkTargetTree: Check object target tree

Description Usage Arguments Details Author(s) See Also Examples

View source: R/checkTargetTree.R

Description

Retrieves the targeting description of a specific object.

Usage

1
2
checkTargetTree(id, token, limit.type = NULL, limit = 100, n = 100,
  verbose = FALSE)

Arguments

id

ID of object to retrieve.

token

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

limit.type

Limit the type of audience to retrieve, defaults to NULL. See findParams

limit

Number of results requested at each API call, defaults to 100. Sometimes useful to bring it down if many results (n) are required as the API might otherwise return error_code: 1 or in other words an "Unknown error".

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).

verbose

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

Details

Corresponds to this API call; https://developers.facebook.com/docs/marketing-api/targeting-description/v2.7

Author(s)

John Coene jcoenep@gmail.com

See Also

checkTargetSentence

Examples

1
2
3
4
5
6
7
8
## Not run: 
# get information on account
ads <- grabAds(account.id = "act_123456789012345", token = "XXXXXXXXXXX")

# fetch targeting description of random ad
checkTargetTree(id = sample(ads$id, 1), token = "XXXXXXXXXXX")

## End(Not run)

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