daroczig / fbRads

Analyze and manage Facebook ads from R using this client library to access their Marketing APIs
GNU Affero General Public License v3.0
153 stars 57 forks source link

fbad_add_audience error with schema using multiple columns #130

Open naokiohno opened 4 years ago

naokiohno commented 4 years ago

I've been trying to upload customers to my newly created custom audience.

fbad_add_audience(audience_id = "621513444XXXX", schema = c("EMAIL", "FN", "LN", "CT", "ZIP"), hashes = c(df$email, df$fname, df$lname, df$city, df$postal_code))

I got the following error:

INFO [2020-10-30 23:38:55] Adding 1291670 EMAIL to 621513444XXXX custom audience ID. INFO [2020-10-30 23:38:55] Adding 1291670 FN to 621513444XXXX custom audience ID. INFO [2020-10-30 23:38:55] Adding 1291670 LN to 621513444XXXX custom audience ID. INFO [2020-10-30 23:38:55] Adding 1291670 CT to 621513444XXXX custom audience ID. INFO [2020-10-30 23:38:55] Adding 1291670 ZIP to 621513444XXXX custom audience ID. Error: Tried to unbox a vector of length 5

I saw in the documentation that only email and phone number are mentioned as schema. Are the rest of the schema I used such as name, city, and zip code not supported in the package? Furthermore, is it not possible to match based on multiple columns? This function doesn't seem to support it.