facebook / facebook-java-business-sdk

Java SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
399 stars 329 forks source link

[Autocomplete search] - Unable to fetch the list of all possible country_group using SDK #399

Closed gotham3 closed 1 year ago

gotham3 commented 2 years ago

Which SDK version are you using?

v14.0.0

What's the issue?

Unable to fetch the list of all possible country_group supported on Facebook, using the SDK. However the same API call is working when directly hitting the API through Postman.

Steps/Sample code to reproduce the issue

APIRequest<APINode> apiRequest = new APIRequest<>(context, "", "search", "GET");
Map<String, Object> params = new HashMap<>();
params.put("type", "adgeolocation");
params.put("location_types", List.of("country_group"));
APIResponse response = apiRequest.execute(params);

I even tried passing parameter 'q' as empty string "".

Observed Results:

Expected Results:

stcheng commented 1 year ago

verified on the latest version that the output is as expected.