Learn R Programming

rfacebookstat (version 2.16.1)

fbDownloadBusinessInvoices: Download Business Invoices

Description

fbDownloadBusinessInvoices downloads invoice PDF files from a vector of URLs. It automatically handles both Graph API URLs (adding access tokens) and direct CDN URLs.

Usage

fbDownloadBusinessInvoices(
  urls,
  dest_dir = ".",
  file_names = NULL,
  username = getOption("rfacebookstat.username"),
  token_path = fbTokenPath(),
  access_token = getOption("rfacebookstat.access_token")
)

Value

A data frame (tibble) containing the download status for each URL.

Arguments

urls

A character vector of URLs (from `download_uri` or `cdn_download_uri`).

dest_dir

Destination directory where files will be saved. Defaults to the current working directory.

file_names

Optional character vector of file names. If NULL, names will be auto-generated.

username

your username on Facebook

token_path

path to dir with credentials

access_token

Your facebook API token

Author

Alexey Seleznev