#' Grab list of adsets
#'
#' @description Fetches the list of adsets under a given account or campaign.
#'
#' @inheritParams grabAds
#'
#' @examples
#' \dontrun{
#' adsets <- grabAdsets(id = "act_123456789012345", token = "XXXXXX")
#'
#' }
#'
#' @seealso \code{\link{getAdset}}
#'
#' @author John Coene \email{jcoenep@@gmail.com}
#'
#' @export
grabAdsets <- function (id, token, fields = "default", ..., n = 100,
verbose = FALSE, limit = 100) {
fb_data <- findObjects(id = id, token = token, fields = fields, ...,
n = n, verbose = verbose, object = "adsets",
FUN = "grabAdsets", limit = limit)
if (nrow(fb_data) == 0) warning(paste("No data."), call. = FALSE)
return(fb_data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.