Class: FacebookAds::AdAudience

Inherits:
Base
  • Object
show all
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

Methods inherited from Base

all, delete, #destroy, find, find_by, get, paginate, post, #save, #update

Instance Method Details

#ad_accountObject

belongs_to ad_account



10
11
12
# File 'lib/facebook_ads/ad_audience.rb', line 10

def 
  @ad_account ||= AdAccount.find("act_#{}")
end

#share(account_id) ⇒ Object

actions



16
17
18
19
20
21
22
23
24
# File 'lib/facebook_ads/ad_audience.rb', line 16

def share()
  query = {
    share_with_object_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