getEstReach: Get ad estimated reach

Description Usage Arguments Author(s) See Also Examples

View source: R/getEstReach.R

Description

Retrieves given ad expected reach

Usage

1
getEstReach(id, token, optimize_for = "APP_INSTALLS")

Arguments

id

The id of the object you want to retrieve (Required), see how to find yours.

token

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

optimize_for

What you are optimizing for. This API generates min, median, and max bid estimates related to the optimization goal, defaults to APP_INSTALLS, see official documentation or findParams for valid values

Author(s)

John Coene jcoenep@gmail.com

See Also

listLabels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# run authentication with your app details
TK <- fbAuthenticate(app.id = "1234567890123456", 
                     app.secret = "16xx79321xx0130x2x10a08x3e2x80xx")

# get all accounts users (me) has access to
accounts <- listAccounts("me", TK, n = 999999)
ads <- listAds(sample(accounts$id, 1), TK)

reach <- getEstReach(samples(ads$id, 1), TK)

## End(Not run)

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