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

Unable to pull ad account data #143

Open
Datacove1 opened this issue Sep 15, 2021 · 0 comments
Open

Unable to pull ad account data #143

Datacove1 opened this issue Sep 15, 2021 · 0 comments

Comments

@Datacove1
Copy link

Hello,

I'm trying to pull ad account data into R, but it keeps either failing or timing out. This could be to do with an API issue (as I know Facebook are having some problems at the moment), but I'm not convinced because the error message says:

Error in fbad_request(path = url$path, method = "GET", params = url$params, :
Unsupported get request. Object with ID 'vhttps:' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api

Anonymised code below

fb_token <- "my_token"
Account <- fbad_init(accountid = "my_account", fb_token, version="10.0")

FB_raw <- fb_insights(level="ad",time_increment=1,date_preset="this_year",breakdowns="publisher_platform",
                      action_attribution_windows="28d_click,7d_view",
                      fields=toJSON(c("campaign_name","adset_name","ad_name","spend","impressions",
                                      "inline_link_clicks","actions","converted_product_value"))) %>%  do.call(rbind.data.frame,.)

This used to work fine with API v9.0, but today is the first time I've used it since that was deprecated - so wondering if it's version 10 that's actually causing the issue. Any help much appreciated.

Many thanks,

Jeremy

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

0 participants