Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of AdSet suffers from breaking changes #41

Open
5 tasks done
kirsar opened this issue Jun 16, 2022 · 1 comment
Open
5 tasks done

Creation of AdSet suffers from breaking changes #41

kirsar opened this issue Jun 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@kirsar
Copy link

kirsar commented Jun 16, 2022

Checklist

Environment

  • Node Version: 16.15.0
  • NPM Version: 8.5.5

Goals

Be able to use strongly-typed programming without type casting when creating API resources, as it was possible before v13

Expected Results

I expect existing code using facebook-java-business-sdk which creates AdSet in particular to compile without errors
There are no breaking changes introduced in v13 changelog related to AdSet creation
https://developers.facebook.com/docs/graph-api/changelog/version13.0

Actual Results

Compilation error due to:

before commit

public static class APIRequestCreateAdSet extends APIRequest<AdSet>

after

public static class APIRequestCreateAdSet extends APIRequest<APINode>

before commit

public APIRequestCreateAdSet setBillingEvent (AdSet.EnumBillingEvent billingEvent)

after

public APIRequestCreateAdSet setBillingEvent (EnumBillingEvent billingEvent)

image

There are more enums which suffered from additional enum definition copies added
There are more entities which lost strongly-typed api
One can observe the same in node.js sdk returning Promise<AbstractObject>

Steps to Reproduce

Try to compile examples

Steps to Fix

Restore return type back to "AdSet" in spec

Restore "node" property on "adaccountadsets_billing_event_enum_param" back to "AdSet" in spec

I'd be happy to create PR, but commit tells the spec was "Automitically generate from our internal API framework." which I don't have access to.

I can confirm java sdk is fully compilable after mentioned changes

I might be missing something, since I just joined a java project and learning java for 5 days and fb business api for 1.5 days, but it'd be so nice to leave the code as is without typecasting.

@hsabbathi
Copy link

Seeing the same issue. v12 gets deprecated around Aug 9th, so we'll have to roll out fix or do type casting 😮‍💨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants