[Autocomplete search] - Unable to fetch the list of all possible country_group using SDK
gotham3 opened this issue · comments
Nandini commented
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:
- What happened? This could be a description, log output, etc.
Empty response was returned.
Expected Results:
- What did you expect to happen?
Ideally the list of all possible country_group should be returned.
Please note that this exact API works when hitting through postman.
Here's the cURL I used -
curl --location -g --request GET 'https://graph.facebook.com/v14.0/search?location_types=["country_group"]&type=adgeolocation&access_token=*******'
Shuotian Cheng commented
verified on the latest version that the output is as expected.