-
Notifications
You must be signed in to change notification settings - Fork 338
Open
Description
Which SDK version are you using?
20.0.0
What's the issue?
Date preset enums EnumDatePreset are being serialized to the graph API URLs parameters as upper case values. Producing a message 100 error
Steps/Sample code to reproduce the issue
APINodeList<Ad> ads = account.getAds()
.setParam("date_format", "U") //request dates as epochs
.setParam("limit", 100) //page size
.setDatePreset(Ad.EnumDatePreset.VALUE_LAST_90D)
.requestFields(fields)
.execute();Observed Results:
When added to the URL the endpoint complains with the error
{
"error": {
"message": "(#100) date_preset must be one of the following values: today, yesterday, this_month, last_month, this_quarter, maximum, data_maximum, last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, last_week_mon_sun, last_week_sun_sat, last_quarter, last_year, this_week_mon_today, this_week_sun_today, this_year",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "Af7UW8liBFkZ_n4YuiC-_KS"
}
}You can see from the URL that was built for the request the date_preset is uppercase - manually changing it to lower case produces the correct response from the endpoint
Expected Results:
I expect the enum values to be serialized to the url in lower case as in last_90d not LAST_90_D
Metadata
Metadata
Assignees
Labels
No labels