Facebook CustomAudience - Policy ID is not available for Ad Account

326 Views Asked by At

I have problem with getting more information about Custom Audience. I'm setting the id that I have from first request but I need more information.

I use java code:

APINodeList<CustomAudience> customAudiences = CustomAudience.fetchByIds(Collections.singletonList(customAudience.getId()),
                    Arrays.asList(CustomAudience.APIRequestGet.FIELDS), apiContext);

And I'm getting:

com.facebook.ads.sdk.APIException$FailedRequestException: {"error":{"message":"(#100) Policy ID is not available for Ad Account.","type":"OAuthException","code":100,"fbtrace_id":"--------"}}

The same error I have when i use facebook Graph Explorer.

This problem I have when I upgrade the facebook api to v3.2 Old version was ok.

1

There are 1 best solutions below

0
On

I have changed CustomAudience.APIRequestGet.FIELDS to specify fields that I really need then it works fine.

APINodeList<CustomAudience> customAudiences = CustomAudience.fetchByIds(Collections.singletonList(customAudience.getId()),
                    Arrays.asList(new String[]{"name", "description", "account_id", "opt_out_link"}), apiContext);

the same problem is with CustomAudience.fetchById -> change to CustomAudience.fetchByIds