Closed Michael3434 closed 4 years ago
You can get amount spent on campaign from insight data like below.
campaign = FacebookAds::Campaign.get(<CAMPAIGN_ID>)
campaign.insights(date_preset: "lifetime", fields: "spend").first
=> #<FacebookAds::AdsInsights {:spend=> <SPEND>, :date_start=> <START_DATE>, :date_stop=> <STOP_DATE>}>
I can confirm that this works :-)
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.
Hey, I cannot get from a campagin the amount spend. I tryed many fields ( dayli_spend, spend, amount spend etc.. ) : undefined method `amount_spent' for #
Any ideas ?
Thanks :)