public static final String DEFAULT_API_VERSION = "v13.0";
needs to be
public static final String DEFAULT_API_VERSION = "v14.0";
I have downloaded the API code and made this change but when i try to compile it i get a new problem. The API call works but all the classes have an issue with nodelist return types which i assume means i've done something wrong with my compile settings or dependancies? Whilst an upodated SDK on maven would be perfect, a hint on fixing this second issue would get me unblocked.
"The return type is incompatible with APINode.parseResponse(String, APIContext, APIRequest, String)"
Which SDK version are you using?
What's the issue?
All versions of the graph api before version 14 currently give a response http status 400 body of the sort
{"error":{"message":"(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v14.0."...
A fix exists https://github.com/facebook/facebook-java-business-sdk/issues/390
https://github.com/facebook/facebook-java-business-sdk/blob/main/src/main/java/com/facebook/ads/sdk/APIConfig.java
public static final String DEFAULT_API_VERSION = "v13.0"; needs to be public static final String DEFAULT_API_VERSION = "v14.0";
I have downloaded the API code and made this change but when i try to compile it i get a new problem. The API call works but all the classes have an issue with nodelist return types which i assume means i've done something wrong with my compile settings or dependancies? Whilst an upodated SDK on maven would be perfect, a hint on fixing this second issue would get me unblocked.
"The return type is incompatible with APINode.parseResponse(String, APIContext, APIRequest, String)"
Steps/Sample code to reproduce the issue
`package metaConnector;
import java.util.Arrays;
import com.facebook.ads.sdk.APIContext; import com.facebook.ads.sdk.APIException; import com.facebook.ads.sdk.AdAccount; import com.facebook.ads.sdk.AdsInsights;
public class Sandbox { public static void main (String args[]) throws APIException {
} }`
Observed Results:
400 body of the sort
{"error":{"message":"(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v14.0."...
Expected Results:
Ideally a 200 and json data