Closed yc-gjb closed 1 year ago
<dependency> <groupId>com.facebook.business.sdk</groupId> <artifactId>facebook-java-business-sdk</artifactId> <version>17.0.0</version> </dependency>
I can't get ad_id,ad_name,adset_id,adset_name's data in report
1.createReport AdAccount account = new AdAccount("${act_id}", context); AdAccount.APIRequestGetInsightsAsync insights = account.getInsightsAsync(); insights.setFields(Lists.newArrayList("ad_id","ad_name","adset_id","adset_name")); AdReportRun execute = insights.execute(); 2.getReport AdReportRun adReportRun = new AdReportRun("${report_id}",context); try { AdReportRun.APIRequestGetInsights insights = adReportRun.getInsights(); APINodeList execute = insights.execute(); System.out.println(execute ); } catch (APIException e) { e.printStackTrace(); }
I want to get ad_id's data,but there is null;
insights.setLevel(AdsInsights.EnumLevel.VALUE_AD);
Which SDK version are you using?
What's the issue?
I can't get ad_id,ad_name,adset_id,adset_name's data in report
Steps/Sample code to reproduce the issue
1.createReport AdAccount account = new AdAccount("${act_id}", context); AdAccount.APIRequestGetInsightsAsync insights = account.getInsightsAsync(); insights.setFields(Lists.newArrayList("ad_id","ad_name","adset_id","adset_name")); AdReportRun execute = insights.execute(); 2.getReport AdReportRun adReportRun = new AdReportRun("${report_id}",context); try { AdReportRun.APIRequestGetInsights insights = adReportRun.getInsights(); APINodeList execute = insights.execute();
System.out.println(execute );
} catch (APIException e) {
e.printStackTrace();
}
Observed Results:
I want to get ad_id's data,but there is null;