2
我正在創建一個管理,用於查找與我的商家帳戶關聯的Facebook廣告系列的展示次數,點擊次數和銷售線索。 對於展示次數和點擊次數,沒有問題,但我無法找到潛在客戶。 這是試圖計算鏈接到Facebook廣告系列的每個廣告的主角的功能代碼(取自Facebook開發人員)。 通過製出打印的值是:facebook廣告系列廣告的潛在客戶列表始終爲空
SIZE:0, LIST:[]
public void getTotalLeads(Campaign campaignFB) throws APIException {
APINodeList<Ad> ads = campaignFB.getAds().execute();
for (Ad ad : ads) {
Ad adFb = new Ad(ad.getId(), context);
APINodeList<Lead> listLeads = adFb.getLeads().execute();
System.out.println("SIZE: " + listLeads.size());
System.out.println("LIST: " + listLeads);
}
}