Reputation: 53
I'm using the official Facebook API Java SDK to retrieve stats for each of the interests used in the targeting of a specific ad (as described in https://developers.facebook.com/docs/marketing-api/reference/ad-keyword-stats). When trying the call in Graph Explorer it works perfectly but I get an empty response in Java. I have already used the SDK to get insights for campaigns, ad sets and ads so the general setup is working. This is the code I have for now:
APINodeList<AdKeywordStats> stats = new Ad(adId, CONTEXT).getKeywordStats()
.requestAllFields().execute();
System.out.println(stats);
EDIT:
After some digging I think I found the cause of the problem, hopefully this PR should fix it: https://github.com/facebook/facebook-java-ads-sdk/pull/149
Upvotes: 1
Views: 120