1

我正在尝试使用 fbRads 库使用 R 从 facebook 导入数据。

https://cran.r-project.org/web/packages/fbRads/fbRads.pdf

我有一个由 fb_init 函数返回的有效 fbaccount 对象,然后我尝试使用文档中提到的完全相同的示例:

l <- fb_insights(fbacc, date_preset = 'today', level = 'ad')
library(rlist)
list.stack(list.select(l, date_start, date_stop, ad_id, total_actions,
total_unique_actions, total_action_value, impressions, unique_impressions,
social_impressions, unique_social_impressions, clicks, unique_clicks,
social_clicks, unique_social_clicks, spend, frequency, deeplink_clicks,
app_store_clicks, website_clicks, reach, social_reach, ctr, unique_ctr,
cpc, cpm, cpp, cost_per_total_action, cost_per_unique_click,
relevance_score = relevance_score$score))

在变量l中,我得到:

>print(l)
[[1]]
list()

接着

>list.stack(list.select(l, date_start, date_stop, ad_id, total_actions,
+                        total_unique_actions, total_action_value, impression .... [TRUNCATED] 
Error in eval(expr, envir, enclos) : object 'date_start' not found

什么似乎在这里不起作用?我该如何解决?

4

1 回答 1

-1

当我无法获取数据fb_insights(fbacc, level='ad', time_range = '{"since":"2015-08-01","until":"2016-06-31"}')未定义时间间隔时,我设法使用以下命令获取 Fb Ads数据。time_range

于 2016-09-10T16:52:04.130 回答