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
151 stars 57 forks source link

Error in fbad_init(), type 'environment' can't be coerced into vector #105

Closed VenturaJon closed 5 years ago

VenturaJon commented 6 years ago

I have been working with fbRads for a while now and this error has never occurred. However, within the last two weeks this error started popping up when I ran my script:

ERROR [2018-08-13 16:45:45] URL: https://graph.facebook.com/v2.5/act_308354846/ ERROR [2018-08-13 16:45:45] Method: GET ERROR [2018-08-13 16:45:45] Params: List of 1 $ fields: chr "name,account_id,account_status,age,amount_spent,balance,capabilities,end_advertiser,funding_source,spend_cap,timezone_id,users" Error in fbadrequest(path = paste0("act", accountid, "/"), method = "GET", : This is a bug in the fbRads package. Please report on GitHub with a detailed output: cannot coerce type 'environment' to vector of type 'character'

My script has consistently been the following: fbacc <- fbad_init(accountid = accountid, token = fb_tkn_read, version = '2.5'), where I specify the token and account ID within the stated objects.

Any ideas as to why this is occurring or if it is related to the changes in Facebook API?

daroczig commented 6 years ago

Hm, that API version has been deprecated by FB a long time ago. Can you please check the fbad_init call with the most recent version of fbRads installed from GH and specifying a more recent API version, eg 3.0 or so?

daroczig commented 5 years ago

Seems to be using old version, no response, closing.