and when I try to get all actions for one account, I receive the next error.
Traceback (most recent call last):
4: from fb_ads.rb:49:in <main>' 3: from /usr/local/rvm/gems/ruby-2.5.1/gems/facebookbusiness-0.4.0.1/lib/facebook_ads/edge.rb:46:ineach'
2: from fb_ads.rb:54:in block in <main>' 1: from /usr/local/rvm/gems/ruby-2.5.1/gems/facebookbusiness-0.4.0.1/lib/facebook_ads/fields.rb:48:inblock in define_reader'
/usr/local/rvm/gems/ruby-2.5.1/gems/facebookbusiness-0.4.0.1/lib/facebook_ads/helpers/node_helpers.rb:46:in `load!': load! is not supported for this object (RuntimeError)
ad_account.insights(fields: 'cpc,clicks,cost_per_conversion,ctr,impressions,reach,spend,actions',
time_range: "{'since':'2019-06-01','until':'2019-06-30'}",
).each do |insights|
ap insights.actions
end
Which SDK version are you using?
Hello,
I am using facebookbusiness-0.4.0.1
and when I try to get all actions for one account, I receive the next error.
Traceback (most recent call last): 4: from fb_ads.rb:49:in
<main>' 3: from /usr/local/rvm/gems/ruby-2.5.1/gems/facebookbusiness-0.4.0.1/lib/facebook_ads/edge.rb:46:in
each' 2: from fb_ads.rb:54:inblock in <main>' 1: from /usr/local/rvm/gems/ruby-2.5.1/gems/facebookbusiness-0.4.0.1/lib/facebook_ads/fields.rb:48:in
block in define_reader' /usr/local/rvm/gems/ruby-2.5.1/gems/facebookbusiness-0.4.0.1/lib/facebook_ads/helpers/node_helpers.rb:46:in `load!': load! is not supported for this object (RuntimeError)This is my code:
ad_account = FacebookAds::AdAccount.get('act_some_account_id')
ad_account.insights(fields: 'cpc,clicks,cost_per_conversion,ctr,impressions,reach,spend,actions', time_range: "{'since':'2019-06-01','until':'2019-06-30'}", ).each do |insights| ap insights.actions end
but when I print only "insights", I get:
{ :cpc => "177.813025", :clicks => "9996", :ctr => "2.209056", :impressions => "452501", :reach => "213311", :spend => "1777419", :actions => [ [ 0] { :action_type => "onsite_conversion.messaging_first_reply", :value => "1" }, [ 1] { :action_type => "onsite_conversion.messaging_conversation_started_7d", :value => "1" }, . . ..... }
there is some wrong with my code?
thanks you,