checkTargetSentence: Check object target

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/checkTargetSentence.R

Description

Retrieves the targeting description (in sentence lines) of a specific ad or adset. See checkTargetTree

Usage

1
checkTargetSentence(id, token, n = 100, limit = 100)

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.

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

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

Details

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

Value

Returns a data.frame containing targeting sentences as columns.

Author(s)

John Coene jcoenep@gmail.com

See Also

checkTargetTree

Examples

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

# pick random ad.id
rand_id <- sample(ads$id, 1)

# fetch targeting description of random ad
checkTargetSentence(id = rand_id, n = 100, token = "XXXXXXXXXXX")

## End(Not run)

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