0

I am trying to get all ads from different political pages on Facebook using the Radlibrary package in R -- which I have done a hundred times before with no problem at all. Now I experience that some ads are not returned -- there`s no system in which ads are not returned: for one party it is just a few ads in april 2022, for another it's all ads after 1/1/2021 -- but the thing in common is that I get some of the ads.

The problem is similar to the one described here: https://github.com/facebookresearch/Radlibrary/issues/103

Also, I know the ads are available since they are 1) displayed both in the browser version of the Ad Library but also if I download them as a .csv file from facebook.com/ads/library and 2) I have managed to get the ads that now are missing in a previous pull a couple of months ago

My code is (which only returns 117 out of 210 ads):

library("Radlibrary")

query_ad <- adlib_build_query(ad_reached_countries = 'DK',
                              ad_active_status = 'ALL',
                              search_terms = "NULL",
                              search_page_ids = "223040066022",
                              fields = c(
                                "id",
                                "ad_creation_time",
                                "ad_creative_bodies",
                                "ad_delivery_start_time",
                                "ad_delivery_stop_time",
                                "ad_snapshot_url",
                                "currency",
                                "page_id",
                                "page_name",
                                "publisher_platforms",
                                "impressions",
                                "spend"
                              ))

response_ad <- adlib_get_paginated(query_ad, max_gets = 10, token = token)

results_tibble_ad <- as_tibble(response_ad, type = "ad",
                               censor_access_token = NULL)

1 Answer 1

0

This is resolved in the newest release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.