Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Error in fbad_request: cannot coerce type 'environment' to vector of type 'character' #58

Closed
andrewmccoolCNE opened this issue May 9, 2017 · 3 comments

Comments

@andrewmccoolCNE
Copy link

I'm getting the following error, which let me know to report on GitHub below. I've tried the same command with v2.9 with the same result, do you have any suggestions here? Thanks!

> fbacc <- fbad_init(accountid = ###,
...                            token = tkn,
...                            version = '2.8')
ERROR [2017-05-09 08:24:55] URL:  https://graph.facebook.com/v2.8/act_###/
ERROR [2017-05-09 08:24:55] Method:  GET
ERROR [2017-05-09 08:24:55] Params:  List of 1
 $ fields: chr "name,account_id,account_status,age,amount_spent,balance,end_advertiser,funding_source,spend_cap,timezone_id,users"
Error in fbad_request(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' 
@daroczig
Copy link
Owner

Can you please share your session info or devtools::session_info() would be even better.

@PK1621
Copy link

PK1621 commented May 10, 2017

Hi Andrew,

I guess your token is not a character but an environment as the error says. Try extracting the token from the environment. (with $credentials)

Philipp

@daroczig
Copy link
Owner

Good catch, @PK1621, thanks for pointing that out. Based on that, I'm closing this comment, please reopen if you think that's still an issue in the package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants