Closed mkmetko closed 5 years ago
Can you try specifying the countries as a list then to be converted into a JSON array?
geo_locations = list(countries = list("US")))
@daroczig already tried this, new error occurs:
ERROR [2018-12-05 14:35:19] Body: {"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_data":{"blame_field_specs":[["lifetime_budget"]]},"error_subcode":1885272,"is_transient":false,"error_user_title":"Budget Is Too Low","error_user_msg":"The budget for this ad set must be at least \u20ac3.00. Please edit your budget in your ad set to enable delivery of your ads.","fbtrace_id":"AwHt5hPegUu"}} Error in fbad_request(fbacc, path = paste0("act_", fbacc$account_id, "/adsets"), : Invalid parameter
Awesome, then please check that error msg and act accordingly :) FTR both the previous and this error messages are coming from the FB API -- make sure to get familiar with the API endpoints and the related FB docs.
When trying to set targeting param for new Adset, I get error:
My code:
fbad_create_adset(fbacc = fb_acc_init, name = fb_adset_e_name, optimization_goal= "POST_ENGAGEMENT", campaign_id = post_campaign_id, daily_budget = 5, bid_amount = 1, targeting = list( geo_locations = list(countries = "US") ) )
This works with other calls, like fbad_reachestimate. Does fbad_create_adset need other format? Thanks