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

Unable to pull ad account data #143

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions