Class: FacebookAds::AdAudience
- Defined in:
- lib/facebook_ads/ad_audience.rb
Overview
Constant Summary collapse
- FIELDS =
%w[id account_id subtype name description approximate_count data_source delivery_status external_event_source lookalike_audience_ids lookalike_spec operation_status opt_out_link permission_for_actions pixel_id retention_days rule time_content_updated time_created time_updated].freeze
Instance Method Summary collapse
-
#ad_account ⇒ Object
belongs_to ad_account.
-
#share(account_id) ⇒ Object
actions.
Methods inherited from Base
delete, #destroy, find, get, paginate, post, #save, #update
Instance Method Details
#ad_account ⇒ Object
belongs_to ad_account
8 9 10 |
# File 'lib/facebook_ads/ad_audience.rb', line 8 def ad_account @ad_account ||= AdAccount.find("act_#{account_id}") end |
#share(account_id) ⇒ Object
actions
14 15 16 17 18 19 20 21 22 |
# File 'lib/facebook_ads/ad_audience.rb', line 14 def share(account_id) query = { share_with_object_id: account_id, share_with_object_type: 'Account' } result = AdAccount.post("/#{id}/share_with_objects", query: query) # result['success'] result # No idea what this response looks like. end |