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

Ad Account end_advertiser parameter should accept string #9

Closed
premist opened this issue Aug 9, 2017 · 2 comments
Closed

Ad Account end_advertiser parameter should accept string #9

premist opened this issue Aug 9, 2017 · 2 comments
Labels

Comments

@premist
Copy link

premist commented Aug 9, 2017

When creating a new AdAccount on business, end_advertiser should be provided in string format. However, it is defined as object as you can see below:

https://github.com/facebook/facebook-ruby-ads-sdk/blob/a36667227509db43a37ea8fe32d1710464f7eb4d/lib/facebook_ads/ad_objects/business.rb#L66

This raises #<JSON::GeneratorError: only generation of JSON objects or arrays allowed> because lib/facebook_ads/field_types/object.rb tries to generate JSON from a string.

https://github.com/facebook/facebook-ruby-ads-sdk/blob/a36667227509db43a37ea8fe32d1710464f7eb4d/lib/facebook_ads/field_types/object.rb#L29

Example code used

@business = FacebookAds::Business.get("BUSINESS_ID", "name", MY_BUSINESS_MANAGER_ADMIN_ACCOUNT_SESSION)
@business.adaccount.create(name: "Test AdAccount", currency: "USD", end_advertiser: MY_APP_ID)

# JSON::GeneratorError: only generation of JSON objects or arrays allowed
# from /Users/premist/.gem/ruby/2.3.4/gems/json-1.8.6/lib/json/common.rb:223:in `generate'

References

@stale
Copy link

stale bot commented Jan 14, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Jan 14, 2020
@stale
Copy link

stale bot commented Jan 21, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant