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_init issue #123

Closed danielad-k closed 4 years ago

danielad-k commented 4 years ago

Hello, I get the following error when i try to connect to fbad_init image

When I ran, debugonce(fbRads:::fbad_request) fbad_init(accountid=accountid, token=token3, version = "7.0")

I got the following message for curlres$message: image Thank you!

daroczig commented 4 years ago

Can you please share your sessionInfo() (or sessioninfo::session_info() would be even better) after loading fbRads?

danielad-k commented 4 years ago

Hello, Here you go: image

danielad-k commented 4 years ago

One more thing: the code below actually works too:

library("RCurl") library("jsonlite")

myURL=paste0("https://graph.facebook.com/v7.0/act_XXXXX/insights?fields&level=ad&", "access_token=XXXXXX" ) print(myURL) print(getURL(fromJSON(myURL)))

daroczig commented 4 years ago

Can you please give a try to #125?

devtools::install_github('daroczig/fbRads@ssl_version_6')
danielad-k commented 4 years ago

Now I get this error: image

daroczig commented 4 years ago

Can you please post the results of RCurl::curlVersion()?

danielad-k commented 4 years ago

Here you go: image

daroczig commented 4 years ago

Oh my, that explains -- the OpenSSL version is really old. Probably that's a Windows issue due to the bundled lib in RCurl... I should at some point drop RCurl and switch to curl or httr anyway ... but it's a larger change that I won't do in the near future (and if I do, probably will go with reticulate and the Python FB Business SDK integration), so no quick fixes for this, sorry.

What you could try is building RCurl with a most recent version of OpenSSL or using the package from Linux meanwhile. I will think about a better solution for this, sorry that this is not that helpful.

danielad-k commented 4 years ago

thank you. This gives me direction of what to fix.