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

AdCampaignDeliveryEstimate TypeError problems #34

Closed
adam-szczombrowski opened this issue Nov 29, 2017 · 6 comments
Closed

AdCampaignDeliveryEstimate TypeError problems #34

adam-szczombrowski opened this issue Nov 29, 2017 · 6 comments
Labels

Comments

@adam-szczombrowski
Copy link

Hi, maybe I'm not getting something here but when I get delivery estimate for adset I cannot read the responses data, almost all methods beside to_yaml return

TypeError: no implicit conversion of Hash into String. It seems to me like there is a bug in the gem.

@adam-szczombrowski
Copy link
Author

@alanho could you please look into it? I'm unable to get any attribute values on delivery_estimate object. It always returns Undefined method estimate_dau and similar to that.

@alanho
Copy link
Contributor

alanho commented Dec 8, 2017

hi @adam-szczombrowski , sorry for the delayed response. do you have any sample code that could reproduce the problem that i could look at?

@adam-szczombrowski
Copy link
Author

client = FacebookAds::AdAccount.get(@account_id, {access_token: @access_token, app_secret: FacebookAds.config.app_secret })

delivery_estimate = client.adsets.first.delivery_estimate

and now whenever trying to send methods to delivery_estimate object it raises TypeError (the only method I found working is to_yaml)

@adam-szczombrowski
Copy link
Author

@alanho here is the output from rails console:

[1] pry(main)> client = Facebook::GetClient.new(User.first).call
  User Load (2.2ms)  SELECT  "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT $1  [["LIMIT", 1]]
=> #<FacebookAds::AdAccount {:id=>"act_103551207093597"}>
[2] pry(main)> estimate = client.adsets.first.delivery_estimate
=> #<#<Class:0x007f90499d9550>:0x007f904c470368
 @name=:delivery_estimate,
 @node=#<FacebookAds::AdSet {:id=>"120330000018073214"}>,
 @options={},
 @should_delegate=false>
[3] pry(main)> estimate.first
TypeError: no implicit conversion of Hash into String
from /Users/adam/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/json-2.1.0/lib/json/common.rb:156:in `initialize'

@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

2 participants