You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@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'
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.
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.
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
References
The text was updated successfully, but these errors were encountered: