public class CodeExample {
public static void main (String args[]) throws APIException {
String access_token = "";
APINodeList<AdsInsights> execute = new AdAccount("account_id", context).getInsights().setDatePreset("日期").execute();
String rawResponse = execute.getRawResponse();
System.out.println(rawResponse);
}
}
返回结果

Facebook Ads API 示例代码解析
本文提供了一个使用 Facebook Ads API 的 Java 示例代码,演示了如何通过指定广告帐户获取广告洞察数据并打印原始响应结果。该示例展示了如何设置日期预设参数来获取特定时间段内的数据。
341





