facebook / facebook-java-business-sdk

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

Using ProductCatalog methods fetch, fetchById, or APIRequestGet requestAllFields returns error #398

Open deipablo opened 2 years ago

deipablo commented 2 years ago

Which SDK version are you using?

v14.0.0

What's the issue?

Using ProductCatalog methods fetch, fetchById, or APIRequestGet requestAllFields returns error:

{"error":{"message":"(#100) Tried accessing nonexisting field (latest_feed_upload_session) on node type (ProductCatalog)","type":"OAuthException","code":100,"fbtrace_id":"ACSmtXUlKfTh-jv6gHjNRbu"}}

Steps/Sample code to reproduce the issue

Take any existing ProductCatalog and use fetch, or try to get one with fetchById, or with get().requestAllFields

Observed Results:

API returns an error because the request includes the field "latest_feed_upload_session" seems to not be available for catalogs anymore. There is no documentation on this on the migration notes of the API, but it worked until SDK v12

The field latest_feed_upload_session doesn't appear in the API documentation anymore, but is still present on the sdk https://github.com/facebook/facebook-java-business-sdk/blob/main/src/main/java/com/facebook/ads/sdk/ProductCatalog.java

Expected Results: