facebookbusiness 25.0.3 → 25.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -0
  3. data/lib/facebook_ads/ad_objects/ad_account.rb +5 -2
  4. data/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb +1 -0
  5. data/lib/facebook_ads/ad_objects/{ig_shopping_review_status.rb → ad_account_feature_preferences.rb} +6 -5
  6. data/lib/facebook_ads/ad_objects/ad_account_feature_preferences_post.rb +24 -0
  7. data/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb +1 -0
  8. data/lib/facebook_ads/ad_objects/ad_account_user_settings.rb +1 -0
  9. data/lib/facebook_ads/ad_objects/ad_activity.rb +7 -0
  10. data/lib/facebook_ads/ad_objects/ad_campaign_goal.rb +36 -0
  11. data/lib/facebook_ads/ad_objects/ad_creative_object_story_spec.rb +1 -0
  12. data/lib/facebook_ads/ad_objects/ad_creative_sourcing_spec.rb +1 -0
  13. data/lib/facebook_ads/ad_objects/ad_set.rb +5 -0
  14. data/lib/facebook_ads/ad_objects/ads_action_stats.rb +3 -0
  15. data/lib/facebook_ads/ad_objects/ads_histogram_stats.rb +3 -0
  16. data/lib/facebook_ads/ad_objects/ads_insights.rb +9 -1
  17. data/lib/facebook_ads/ad_objects/ads_value_adjustment_rule_collection.rb +1 -0
  18. data/lib/facebook_ads/ad_objects/album.rb +1 -0
  19. data/lib/facebook_ads/ad_objects/audio_copyright.rb +1 -0
  20. data/lib/facebook_ads/ad_objects/audio_isrc.rb +1 -0
  21. data/lib/facebook_ads/ad_objects/business.rb +1 -0
  22. data/lib/facebook_ads/ad_objects/comment.rb +1 -0
  23. data/lib/facebook_ads/ad_objects/copyright_audio_asset.rb +2 -0
  24. data/lib/facebook_ads/ad_objects/custom_audience.rb +1 -5
  25. data/lib/facebook_ads/ad_objects/group.rb +1 -0
  26. data/lib/facebook_ads/ad_objects/ig_media.rb +2 -0
  27. data/lib/facebook_ads/ad_objects/ig_media_for_ig_only_api.rb +1 -0
  28. data/lib/facebook_ads/ad_objects/ig_user.rb +8 -1
  29. data/lib/facebook_ads/ad_objects/ig_user_export_for_cam.rb +9 -0
  30. data/lib/facebook_ads/ad_objects/ig_user_for_ig_only_api.rb +20 -1
  31. data/lib/facebook_ads/ad_objects/insights_result.rb +0 -1
  32. data/lib/facebook_ads/ad_objects/instagram_insights_result.rb +0 -1
  33. data/lib/facebook_ads/ad_objects/lead_gen_form_preview_details.rb +1 -0
  34. data/lib/facebook_ads/ad_objects/open_bridge_configuration.rb +2 -0
  35. data/lib/facebook_ads/ad_objects/page.rb +2 -0
  36. data/lib/facebook_ads/ad_objects/product_catalog.rb +1 -1
  37. data/lib/facebook_ads/ad_objects/product_item.rb +1 -0
  38. data/lib/facebook_ads/ad_objects/third_party_partner_viewability_request.rb +1 -0
  39. data/lib/facebook_ads/ad_objects/user.rb +1 -0
  40. data/lib/facebook_ads/ad_objects/whats_app_business_account.rb +7 -0
  41. data/lib/facebook_ads/version.rb +1 -1
  42. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a10e421eaa016e4fd2ba9b81ea6a2e6894db11cc6a25ed1d6ac3e360694efb0a
4
- data.tar.gz: bd1178acf2856eacab6143bfe998b87fcc03678486a001b8f7ea663f14300f2c
3
+ metadata.gz: 575e0b46180dbba69e9c7f3b59af6f80ec64b67c371c97cd8fd03adb2b640779
4
+ data.tar.gz: 644b903dcf5470e06c16558d363d6cfa70fc590c2a23ef1bcdc9e67d1c0c189b
5
5
  SHA512:
6
- metadata.gz: c319d0bda77716e2f857f684408cbc28f8ff566de91109dec1fff9fd73f950efb305c0607d4db2735d22a2d18064fa87c1162d074cbcfcfafbbd258dd33be926
7
- data.tar.gz: 435ba7bdc74c109906f91989f9db7c124488890179e7f6afb099715112188dc465069bcca592f980d6c51f59c4a38e635244e60ef0cea75ffbfb3bda9c29d2c5
6
+ metadata.gz: '090a82e3b13c4ac35a7c411ac6f11be1859898681919dd8b8fdb944d997dbaac56cbbe7066998c9a7f35c1f9327567fc12be32479c25530caaa844fe38411dbc'
7
+ data.tar.gz: 91e784bb934f2438d014b2443cc58e35fc8efb9bec71afa6e0019803cb23de478b3c987b777f2e9fd9777d4f27cfd693783cae76ad5685a626b922eed4daa43b
data/README.md CHANGED
@@ -256,6 +256,66 @@ FacebookAds.configure do |config|
256
256
  end
257
257
  ```
258
258
 
259
+ ## Conversions API
260
+
261
+ The Business SDK includes a server-side client for the [Conversions API](https://developers.facebook.com/docs/marketing-api/conversions-api), used to send web, app, and offline events to Meta directly from your server.
262
+
263
+ ```ruby
264
+ require 'facebook_ads'
265
+
266
+ FacebookAds.configure { |config| config.access_token = '<ACCESS_TOKEN>' }
267
+
268
+ user_data = FacebookAds::ServerSide::UserData.new(
269
+ email: 'joe@eg.com',
270
+ client_ip_address: request.remote_ip,
271
+ client_user_agent: request.user_agent
272
+ )
273
+ custom_data = FacebookAds::ServerSide::CustomData.new(
274
+ currency: 'usd',
275
+ value: 123.45
276
+ )
277
+ event = FacebookAds::ServerSide::Event.new(
278
+ event_name: 'Purchase',
279
+ event_time: Time.now.to_i,
280
+ user_data: user_data,
281
+ custom_data: custom_data,
282
+ event_source_url: 'http://jaspers-market.com/product/123',
283
+ action_source: 'website'
284
+ )
285
+ response = FacebookAds::ServerSide::EventRequest.new(
286
+ pixel_id: '<PIXEL_ID>',
287
+ events: [event]
288
+ ).execute
289
+ print "#{response}\n"
290
+ ```
291
+
292
+ For advanced features — asynchronous requests, concurrent batching, and a custom HTTP service — see [Meta Business SDK Features for Conversions API](https://developers.facebook.com/documentation/ads-commerce/conversions-api/guides/business-sdk-features/).
293
+
294
+ ### Conversions API Parameter Builder integration
295
+
296
+ The SDK bundles the [Conversions API Parameter Builder](https://github.com/facebook/capi-param-builder) ([Ruby README](https://github.com/facebook/capi-param-builder/blob/main/ruby/README.md)) so it can auto-fill key event parameters straight from the incoming HTTP request. Call `set_request_context` on an event and pass the incoming request — see [Framework support](https://github.com/facebook/capi-param-builder/blob/main/ruby/README.md#framework-support) for exactly what to pass for your framework (e.g. a Rails `ActionDispatch::Request`, a Sinatra request, or any Rack `env`). At send time the SDK runs the Parameter Builder and fills in any of these fields you left empty:
297
+
298
+ - `user_data.fbc`, `user_data.fbp`
299
+ - `event_source_url`, `referrer_url`
300
+
301
+ ```ruby
302
+ event = FacebookAds::ServerSide::Event.new(
303
+ event_name: 'Purchase',
304
+ event_time: Time.now.to_i,
305
+ user_data: FacebookAds::ServerSide::UserData.new(email: 'joe@eg.com'),
306
+ action_source: 'website'
307
+ )
308
+ event.set_request_context(request)
309
+
310
+ # Optional: gate which fields may be auto-filled (all default true).
311
+ # event.set_request_context(
312
+ # request,
313
+ # preference: FacebookAds::ServerSide::Preference.new(is_event_source_url_allowed: false)
314
+ # )
315
+ ```
316
+
317
+ Auto-fill is **gated** by the optional `Preference` allowlist, **non-destructive** (a value you set yourself is never overwritten), and **order-independent**. Note that in Ruby, `client_ip_address` is not auto-derived yet — keep setting it (and `client_user_agent`) yourself.
318
+
259
319
  ## SDK Codegen
260
320
  Our SDK is autogenerated from [SDK Codegen](https://github.com/facebook/facebook-business-sdk-codegen). If you want to learn more about how our SDK code is generated, please check this repository.
261
321
 
@@ -500,6 +500,7 @@ module FacebookAds
500
500
  api.has_param :updated_since, 'int'
501
501
  end
502
502
  edge.post 'AdSet' do |api|
503
+ api.has_param :ad_set_goal, 'hash'
503
504
  api.has_param :adlabels, { list: 'object' }
504
505
  api.has_param :adset_schedule, { list: 'object' }
505
506
  api.has_param :attribution_count_type, { enum: -> { AdSet::ATTRIBUTION_COUNT_TYPE }}
@@ -510,6 +511,7 @@ module FacebookAds
510
511
  api.has_param :bid_constraints, 'hash'
511
512
  api.has_param :bid_strategy, { enum: -> { AdSet::BID_STRATEGY }}
512
513
  api.has_param :billing_event, { enum: -> { AdSet::BILLING_EVENT }}
514
+ api.has_param :brand_safety_config, 'hash'
513
515
  api.has_param :budget_schedule_specs, { list: 'object' }
514
516
  api.has_param :budget_source, { enum: -> { AdSet::BUDGET_SOURCE }}
515
517
  api.has_param :budget_split_set_id, 'string'
@@ -538,6 +540,7 @@ module FacebookAds
538
540
  api.has_param :is_dynamic_creative, 'bool'
539
541
  api.has_param :is_incremental_attribution_enabled, 'bool'
540
542
  api.has_param :is_sac_cfca_terms_certified, 'bool'
543
+ api.has_param :is_sequenced_conversion_creation, 'bool'
541
544
  api.has_param :lifetime_budget, 'int'
542
545
  api.has_param :lifetime_imps, 'int'
543
546
  api.has_param :lifetime_min_spend_target, 'int'
@@ -1061,12 +1064,12 @@ module FacebookAds
1061
1064
  edge.post do |api|
1062
1065
  api.has_param :bid_amount, 'int'
1063
1066
  api.has_param :daily_budget, 'int'
1064
- api.has_param :end_time, 'int'
1067
+ api.has_param :end_time, 'datetime'
1065
1068
  api.has_param :lifetime_budget, 'int'
1066
1069
  api.has_param :name, 'string'
1067
1070
  api.has_param :page_id, 'string'
1068
1071
  api.has_param :pixel_id, 'int'
1069
- api.has_param :start_time, 'int'
1072
+ api.has_param :start_time, 'datetime'
1070
1073
  end
1071
1074
  end
1072
1075
 
@@ -149,6 +149,7 @@ module FacebookAds
149
149
  "CAPI_PENETRATION",
150
150
  "CAPI_PERFORMANCE_MATCH_KEY",
151
151
  "CAPI_PERFORMANCE_MATCH_KEY_V2",
152
+ "CAPI_PERFORMANCE_MATCH_KEY_V3",
152
153
  "CASH_REWARDS_OPT_IN",
153
154
  "CATALOG_DYNAMIC_MEDIA",
154
155
  "CATALOG_MATCH_RATE",
@@ -13,15 +13,16 @@ module FacebookAds
13
13
  # on github and we'll fix in our codegen framework. We'll not be able to accept
14
14
  # pull request for this class.
15
15
 
16
- class IgShoppingReviewStatus < AdObject
16
+ class AdAccountFeaturePreferences < AdObject
17
17
 
18
- field :onsite_eligibility, 'IgShoppingReviewStatusOnsiteEligibility'
19
- field :reasons, { list: 'IgShoppingReviewStatusReasonWithHelpMessage' }
20
- field :status, 'string'
21
- has_no_id
18
+ field :id, 'string'
22
19
  has_no_get
23
20
  has_no_post
24
21
  has_no_delete
25
22
 
23
+ has_edge :feature_preferences do |edge|
24
+ edge.post 'AdAccountFeaturePreferencesPost'
25
+ end
26
+
26
27
  end
27
28
  end
@@ -0,0 +1,24 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ # FB:AUTOGEN
8
+
9
+ module FacebookAds
10
+ # This class is auto-generated.
11
+
12
+ # For any issues or feature requests related to this class, please let us know
13
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
14
+ # pull request for this class.
15
+
16
+ class AdAccountFeaturePreferencesPost < AdObject
17
+
18
+ field :id, 'string'
19
+ has_no_get
20
+ has_no_post
21
+ has_no_delete
22
+
23
+ end
24
+ end
@@ -420,6 +420,7 @@ module FacebookAds
420
420
  "product_audience_specs",
421
421
  "prospecting_audience",
422
422
  "publisher_platforms",
423
+ "purchase_intent",
423
424
  "radius",
424
425
  "region_keys",
425
426
  "regions",
@@ -48,6 +48,7 @@ module FacebookAds
48
48
  field :ads_manager_footer_row_toast_impressions, 'int'
49
49
  field :auto_review_video_caption, 'bool'
50
50
  field :budget_optimization_quick_view_created, 'bool'
51
+ field :budget_pool_qv_created, 'bool'
51
52
  field :campaign_overview_columns, { list: 'string' }
52
53
  field :column_suggestion_status, 'string'
53
54
  field :conditional_formatting_rules, { list: 'string' }
@@ -79,6 +79,9 @@ module FacebookAds
79
79
  "update_ad_set_bid_strategy",
80
80
  "update_ad_set_bidding",
81
81
  "update_ad_set_budget",
82
+ "update_ad_set_budget_scaling_cost_target",
83
+ "update_ad_set_budget_scaling_extra_budget",
84
+ "update_ad_set_budget_scaling_status",
82
85
  "update_ad_set_cost_bidding_mode",
83
86
  "update_ad_set_duration",
84
87
  "update_ad_set_learning_stage_status",
@@ -105,6 +108,9 @@ module FacebookAds
105
108
  "update_campaign_delivery_type",
106
109
  "update_campaign_group_ad_scheduling",
107
110
  "update_campaign_group_agency_fee",
111
+ "update_campaign_group_budget_scaling_cost_target",
112
+ "update_campaign_group_budget_scaling_extra_budget",
113
+ "update_campaign_group_budget_scaling_status",
108
114
  "update_campaign_group_budget_scheduling_state",
109
115
  "update_campaign_group_delivery_type",
110
116
  "update_campaign_group_high_demand_periods",
@@ -150,6 +156,7 @@ module FacebookAds
150
156
  field :object_id, 'string'
151
157
  field :object_name, 'string'
152
158
  field :object_type, 'string'
159
+ field :tool, 'string'
153
160
  field :translated_event_type, 'string'
154
161
  has_no_id
155
162
  has_no_get
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # All rights reserved.
3
+
4
+ # This source code is licensed under the license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ # FB:AUTOGEN
8
+
9
+ module FacebookAds
10
+ # This class is auto-generated.
11
+
12
+ # For any issues or feature requests related to this class, please let us know
13
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
14
+ # pull request for this class.
15
+
16
+ class AdCampaignGoal < AdObject
17
+
18
+ field :engaged_audiences_audience_label_exclusions, { list: 'string' }
19
+ field :engaged_audiences_audience_label_inclusions, { list: 'string' }
20
+ field :engaged_audiences_exclusions, { list: 'string' }
21
+ field :engaged_audiences_inclusions, { list: 'string' }
22
+ field :existing_customers_audience_label_exclusions, { list: 'string' }
23
+ field :existing_customers_audience_label_inclusions, { list: 'string' }
24
+ field :existing_customers_exclusions, { list: 'string' }
25
+ field :existing_customers_inclusions, { list: 'string' }
26
+ field :is_ca_expansion_enabled, 'bool'
27
+ field :is_lookalike_inclusion_enabled, 'bool'
28
+ field :lookalike_inclusions, { list: 'string' }
29
+ field :type, 'int'
30
+ has_no_id
31
+ has_no_get
32
+ has_no_post
33
+ has_no_delete
34
+
35
+ end
36
+ end
@@ -23,6 +23,7 @@ module FacebookAds
23
23
  field :template_data, 'AdCreativeLinkData'
24
24
  field :text_data, 'AdCreativeTextData'
25
25
  field :video_data, 'AdCreativeVideoData'
26
+ field :whats_app_business_phone_number, 'string'
26
27
  has_no_id
27
28
  has_no_get
28
29
  has_no_post
@@ -24,6 +24,7 @@ module FacebookAds
24
24
  field :enable_social_feedback_preservation, 'bool'
25
25
  field :featured_offering_spec, 'object'
26
26
  field :intent, 'object'
27
+ field :ncs_testimonial, 'object'
27
28
  field :pca_spec, 'object'
28
29
  field :product_media_metadata_spec, 'object'
29
30
  field :promotion_metadata_spec, { list: 'AdCreativePromotionMetadataSpec' }
@@ -224,6 +224,9 @@ module FacebookAds
224
224
  "17",
225
225
  "18",
226
226
  "19",
227
+ "20",
228
+ "21",
229
+ "22",
227
230
  ]
228
231
 
229
232
  TUNE_FOR_CATEGORY = [
@@ -249,6 +252,7 @@ module FacebookAds
249
252
 
250
253
 
251
254
  field :account_id, 'string'
255
+ field :ad_set_goal, 'AdCampaignGoal'
252
256
  field :adlabels, { list: 'AdLabel' }
253
257
  field :adset_schedule, { list: 'DayPart' }
254
258
  field :asset_feed_id, 'string'
@@ -293,6 +297,7 @@ module FacebookAds
293
297
  field :is_dynamic_creative, 'bool'
294
298
  field :is_incremental_attribution_enabled, 'bool'
295
299
  field :is_organic_ad_joint_optimized, 'bool'
300
+ field :is_sequenced_conversion_creation, 'bool'
296
301
  field :issues_info, { list: 'AdCampaignIssuesInfo' }
297
302
  field :learning_stage_info, 'AdCampaignLearningStageInfo'
298
303
  field :lifetime_budget, 'string'
@@ -22,6 +22,7 @@ module FacebookAds
22
22
  field :_1d_ev_all_conversions, 'string'
23
23
  field :_1d_ev_first_conversion, 'string'
24
24
  field :_1d_passback, 'string'
25
+ field :_1d_sequenced, 'string'
25
26
  field :_1d_view, 'string'
26
27
  field :_1d_view_all_conversions, 'string'
27
28
  field :_1d_view_first_conversion, 'string'
@@ -29,6 +30,7 @@ module FacebookAds
29
30
  field :_28d_click_all_conversions, 'string'
30
31
  field :_28d_click_first_conversion, 'string'
31
32
  field :_28d_passback, 'string'
33
+ field :_28d_sequenced, 'string'
32
34
  field :_28d_view, 'string'
33
35
  field :_28d_view_all_conversions, 'string'
34
36
  field :_28d_view_first_conversion, 'string'
@@ -36,6 +38,7 @@ module FacebookAds
36
38
  field :_7d_click_all_conversions, 'string'
37
39
  field :_7d_click_first_conversion, 'string'
38
40
  field :_7d_passback, 'string'
41
+ field :_7d_sequenced, 'string'
39
42
  field :_7d_view, 'string'
40
43
  field :_7d_view_all_conversions, 'string'
41
44
  field :_7d_view_first_conversion, 'string'
@@ -22,6 +22,7 @@ module FacebookAds
22
22
  field :_1d_ev_all_conversions, { list: 'int' }
23
23
  field :_1d_ev_first_conversion, { list: 'int' }
24
24
  field :_1d_passback, { list: 'int' }
25
+ field :_1d_sequenced, { list: 'int' }
25
26
  field :_1d_view, { list: 'int' }
26
27
  field :_1d_view_all_conversions, { list: 'int' }
27
28
  field :_1d_view_first_conversion, { list: 'int' }
@@ -29,6 +30,7 @@ module FacebookAds
29
30
  field :_28d_click_all_conversions, { list: 'int' }
30
31
  field :_28d_click_first_conversion, { list: 'int' }
31
32
  field :_28d_passback, { list: 'int' }
33
+ field :_28d_sequenced, { list: 'int' }
32
34
  field :_28d_view, { list: 'int' }
33
35
  field :_28d_view_all_conversions, { list: 'int' }
34
36
  field :_28d_view_first_conversion, { list: 'int' }
@@ -36,6 +38,7 @@ module FacebookAds
36
38
  field :_7d_click_all_conversions, { list: 'int' }
37
39
  field :_7d_click_first_conversion, { list: 'int' }
38
40
  field :_7d_passback, { list: 'int' }
41
+ field :_7d_sequenced, { list: 'int' }
39
42
  field :_7d_view, { list: 'int' }
40
43
  field :_7d_view_all_conversions, { list: 'int' }
41
44
  field :_7d_view_first_conversion, { list: 'int' }
@@ -17,17 +17,24 @@ module FacebookAds
17
17
  ACTION_ATTRIBUTION_WINDOWS = [
18
18
  "1d_click",
19
19
  "1d_ev",
20
+ "1d_sequenced",
20
21
  "1d_view",
21
22
  "28d_click",
23
+ "28d_sequenced",
22
24
  "28d_view",
23
25
  "28d_view_all_conversions",
24
26
  "28d_view_first_conversion",
25
27
  "7d_click",
28
+ "7d_sequenced",
26
29
  "7d_view",
27
30
  "7d_view_all_conversions",
28
31
  "7d_view_first_conversion",
32
+ "custom",
29
33
  "dda",
30
34
  "default",
35
+ "incrementality",
36
+ "incrementality_all_conversions",
37
+ "incrementality_first_conversion",
31
38
  "skan_click",
32
39
  "skan_click_second_postback",
33
40
  "skan_click_third_postback",
@@ -302,6 +309,8 @@ module FacebookAds
302
309
  field :creative_diversity_data, { list: 'object' }
303
310
  field :creative_diversity_label, 'string'
304
311
  field :creative_diversity_score, 'string'
312
+ field :creative_fatigue_summary, { list: 'object' }
313
+ field :creative_fatigued_ads, { list: 'object' }
305
314
  field :creative_media_type, 'string'
306
315
  field :ctr, 'string'
307
316
  field :date_start, 'string'
@@ -382,7 +391,6 @@ module FacebookAds
382
391
  field :result_rate, { list: 'object' }
383
392
  field :result_values_performance_indicator, 'string'
384
393
  field :results, { list: 'object' }
385
- field :shop_clicks, 'string'
386
394
  field :shops_assisted_purchases, 'string'
387
395
  field :social_spend, 'string'
388
396
  field :spend, 'string'
@@ -16,6 +16,7 @@ module FacebookAds
16
16
  class AdsValueAdjustmentRuleCollection < AdObject
17
17
  ENTRY_POINT = [
18
18
  "ADVERTISING_SETTINGS",
19
+ "L2_AUDIENCE",
19
20
  "L2_CONVERSION_LOCATION",
20
21
  "L2_GLOBAL",
21
22
  "L2_NCA_GOAL",
@@ -115,6 +115,7 @@ module FacebookAds
115
115
  api.has_param :privacy, 'string'
116
116
  api.has_param :profile_id, 'int'
117
117
  api.has_param :provenance_info, 'hash'
118
+ api.has_param :provenance_metadata, 'hash'
118
119
  api.has_param :proxied_app_id, 'string'
119
120
  api.has_param :published, 'bool'
120
121
  api.has_param :qn, 'string'
@@ -15,6 +15,7 @@ module FacebookAds
15
15
 
16
16
  class AudioCopyright < AdObject
17
17
 
18
+ field :audio_asset, 'AudioAsset'
18
19
  field :creation_time, 'datetime'
19
20
  field :displayed_matches_count, 'int'
20
21
  field :id, 'string'
@@ -18,6 +18,7 @@ module FacebookAds
18
18
  field :all_kg_featured_artists, 'string'
19
19
  field :all_kg_main_artists, 'string'
20
20
  field :artist_profile_picture_url, 'string'
21
+ field :canonical_audio_asset, 'AudioAsset'
21
22
  field :id, 'string'
22
23
  field :isrc, 'string'
23
24
  field :publishing_rights_data, 'object'
@@ -1240,6 +1240,7 @@ module FacebookAds
1240
1240
  edge.get 'OpenBridgeConfiguration'
1241
1241
  edge.post 'OpenBridgeConfiguration' do |api|
1242
1242
  api.has_param :active, 'bool'
1243
+ api.has_param :associated_sgw_data_source_id, 'int'
1243
1244
  api.has_param :blocked_event_types, { list: 'string' }
1244
1245
  api.has_param :blocked_websites, { list: 'string' }
1245
1246
  api.has_param :capi_publishing_state, { enum: -> { OpenBridgeConfiguration::CAPI_PUBLISHING_STATE }}
@@ -27,6 +27,7 @@ module FacebookAds
27
27
  "GRAPHQL_MULTIPLE_VALUE_HACK_DO_NOT_USE",
28
28
  "OWNER_OR_COMMENTER",
29
29
  "PENDING_APPROVAL",
30
+ "PRIVATE_CONVERSATION_PARTICIPANTS_ONLY",
30
31
  "REMOVED_BY_ADMIN_ASSISTANT",
31
32
  "SIDE_CONVERSATION",
32
33
  "SIDE_CONVERSATION_AND_POST_OWNER",
@@ -17,10 +17,12 @@ module FacebookAds
17
17
 
18
18
  field :audio_availability_status, 'string'
19
19
  field :audio_library_policy, { list: 'map<string, list<map<string, Object>>>' }
20
+ field :canonical_reference_file, 'AudioAsset'
20
21
  field :creation_time, 'datetime'
21
22
  field :id, 'string'
22
23
  field :reference_file_isrcs, { list: 'string' }
23
24
  field :reference_files, { list: 'object' }
25
+ field :representative_reference_file, 'AudioAsset'
24
26
  field :title, 'string'
25
27
  field :update_time, 'datetime'
26
28
  has_no_get
@@ -16,25 +16,21 @@ module FacebookAds
16
16
  class CustomAudience < AdObject
17
17
  include CustomAudienceHelpers
18
18
  AUDIENCE_LABELS = [
19
- "APP_INSTALLERS",
20
19
  "APP_USERS",
21
20
  "AT_RISK",
22
21
  "CART_ABANDONERS",
23
- "CUSTOMER_LEADS",
24
22
  "DISENGAGED",
25
23
  "DISQUALIFIED_LEADS",
26
24
  "ENGAGED_USERS",
25
+ "GENERAL_CUSTOMERS",
27
26
  "HIGH_VALUE_CUSTOMERS",
28
27
  "LOW_VALUE_CUSTOMERS",
29
28
  "OTHER_1",
30
29
  "OTHER_2",
31
30
  "OTHER_3",
32
- "PERSONAS",
33
31
  "QUALIFIED_LEADS",
34
32
  "RECENT_PURCHASERS",
35
- "RESTRICTED_USERS",
36
33
  "TRIAL_USERS",
37
- "UNWANTED_CUSTOMERS",
38
34
  ]
39
35
 
40
36
  CLAIM_OBJECTIVE = [
@@ -357,6 +357,7 @@ module FacebookAds
357
357
  api.has_param :privacy, 'string'
358
358
  api.has_param :profile_id, 'int'
359
359
  api.has_param :provenance_info, 'hash'
360
+ api.has_param :provenance_metadata, 'hash'
360
361
  api.has_param :proxied_app_id, 'string'
361
362
  api.has_param :published, 'bool'
362
363
  api.has_param :qn, 'string'
@@ -16,6 +16,7 @@ module FacebookAds
16
16
  class IgMedia < AdObject
17
17
 
18
18
  field :alt_text, 'string'
19
+ field :audio_id, 'string'
19
20
  field :boost_eligibility_info, 'IgMediaBoostEligibilityInfo'
20
21
  field :caption, 'string'
21
22
  field :comments_count, 'int'
@@ -25,6 +26,7 @@ module FacebookAds
25
26
  field :has_slider, 'bool'
26
27
  field :id, 'string'
27
28
  field :ig_id, 'string'
29
+ field :is_ai_generated, 'bool'
28
30
  field :is_comment_enabled, 'bool'
29
31
  field :is_shared_to_feed, 'bool'
30
32
  field :legacy_instagram_media_id, 'string'
@@ -20,6 +20,7 @@ module FacebookAds
20
20
  field :comments_count, 'int'
21
21
  field :current_live_viewer_count, 'int'
22
22
  field :id, 'string'
23
+ field :is_ai_generated, 'bool'
23
24
  field :is_comment_enabled, 'bool'
24
25
  field :is_shared_to_feed, 'bool'
25
26
  field :like_count, 'int'
@@ -28,6 +28,7 @@ module FacebookAds
28
28
  field :media_count, 'int'
29
29
  field :mentioned_comment, 'IgComment'
30
30
  field :mentioned_media, 'IgMedia'
31
+ field :mini_shop_storefront, 'Shop'
31
32
  field :name, 'string'
32
33
  field :owner_business, 'Business'
33
34
  field :profile_picture_url, 'string'
@@ -146,6 +147,7 @@ module FacebookAds
146
147
  api.has_param :major_audience_device_type, { list: 'object' }
147
148
  api.has_param :major_audience_gender, { list: { enum: -> { IgUserExportForCam::MAJOR_AUDIENCE_GENDER }} }
148
149
  api.has_param :major_audience_states, { list: 'string' }
150
+ api.has_param :platform, { list: { enum: -> { IgUserExportForCam::PLATFORM }} }
149
151
  api.has_param :query, 'string'
150
152
  api.has_param :recommendation_type, { enum: -> { IgUserExportForCam::RECOMMENDATION_TYPE }}
151
153
  api.has_param :reels_interaction_rate, 'object'
@@ -202,6 +204,7 @@ module FacebookAds
202
204
  api.has_param :collaborators, { list: 'string' }
203
205
  api.has_param :cover_url, 'string'
204
206
  api.has_param :image_url, 'string'
207
+ api.has_param :is_ai_generated, 'bool'
205
208
  api.has_param :is_carousel_item, 'bool'
206
209
  api.has_param :is_paid_partnership, 'bool'
207
210
  api.has_param :location_id, 'string'
@@ -264,7 +267,11 @@ module FacebookAds
264
267
  end
265
268
 
266
269
  has_edge :tags do |edge|
267
- edge.get 'IgMedia'
270
+ edge.get 'IgMedia' do |api|
271
+ api.has_param :media_type, 'string'
272
+ api.has_param :posted_after, 'string'
273
+ api.has_param :posted_before, 'string'
274
+ end
268
275
  end
269
276
 
270
277
  has_edge :upcoming_events do |edge|
@@ -538,6 +538,11 @@ module FacebookAds
538
538
  "unknown",
539
539
  ]
540
540
 
541
+ PLATFORM = [
542
+ "facebook",
543
+ "instagram",
544
+ ]
545
+
541
546
  RECOMMENDATION_TYPE = [
542
547
  "high_ad_performance",
543
548
  "most_ads_experience",
@@ -560,7 +565,10 @@ module FacebookAds
560
565
  field :is_paid_partnership_messages_enabled, 'bool'
561
566
  field :messaging_id, 'string'
562
567
  field :onboarded_status, 'bool'
568
+ field :page_id, 'string'
569
+ field :page_name, 'string'
563
570
  field :past_brand_partnership_partners, { list: 'string' }
571
+ field :platforms, { list: 'string' }
564
572
  field :portfolio_url, 'string'
565
573
  field :profile_picture_url, 'string'
566
574
  field :username, 'string'
@@ -577,6 +585,7 @@ module FacebookAds
577
585
  api.has_param :breakdown, { enum: %w{AGE FOLLOW_TYPE GENDER MEDIA_TYPE TOP_CITIES TOP_COUNTRIES }}
578
586
  api.has_param :metrics, { list: { enum: %w{CREATOR_ENGAGED_ACCOUNTS CREATOR_REACH REELS_HOOK_RATE REELS_INTERACTION_RATE TOTAL_FOLLOWERS }} }
579
587
  api.has_param :period, { enum: %w{DAY OVERALL }}
588
+ api.has_param :platform, { list: { enum: %w{FACEBOOK INSTAGRAM }} }
580
589
  api.has_param :time_range, { enum: %w{LAST_14_DAYS LAST_90_DAYS LIFETIME THIS_MONTH THIS_WEEK }}
581
590
  end
582
591
  end
@@ -81,6 +81,7 @@ module FacebookAds
81
81
  api.has_param :collaborators, { list: 'string' }
82
82
  api.has_param :cover_url, 'string'
83
83
  api.has_param :image_url, 'string'
84
+ api.has_param :is_ai_generated, 'bool'
84
85
  api.has_param :is_carousel_item, 'bool'
85
86
  api.has_param :is_paid_partnership, 'bool'
86
87
  api.has_param :location_id, 'string'
@@ -140,6 +141,20 @@ module FacebookAds
140
141
  end
141
142
  end
142
143
 
144
+ has_edge :passthreadcontrol do |edge|
145
+ edge.post do |api|
146
+ api.has_param :metadata, 'string'
147
+ api.has_param :recipient, 'object'
148
+ api.has_param :target_app_id, 'string'
149
+ end
150
+ end
151
+
152
+ has_edge :releasethreadcontrol do |edge|
153
+ edge.post do |api|
154
+ api.has_param :recipient, 'object'
155
+ end
156
+ end
157
+
143
158
  has_edge :stories do |edge|
144
159
  edge.get
145
160
  end
@@ -153,7 +168,11 @@ module FacebookAds
153
168
  end
154
169
 
155
170
  has_edge :tags do |edge|
156
- edge.get
171
+ edge.get do |api|
172
+ api.has_param :media_type, 'string'
173
+ api.has_param :posted_after, 'string'
174
+ api.has_param :posted_before, 'string'
175
+ end
157
176
  end
158
177
 
159
178
  has_edge :welcome_message_flows do |edge|
@@ -23,7 +23,6 @@ module FacebookAds
23
23
 
24
24
  METRIC = [
25
25
  "comments",
26
- "content_views",
27
26
  "crossposted_views",
28
27
  "facebook_views",
29
28
  "follows",
@@ -23,7 +23,6 @@ module FacebookAds
23
23
 
24
24
  METRIC = [
25
25
  "comments",
26
- "content_views",
27
26
  "crossposted_views",
28
27
  "facebook_views",
29
28
  "follows",
@@ -54,6 +54,7 @@ module FacebookAds
54
54
  field :return_to_facebook_text, 'string'
55
55
  field :review_your_info_text, 'string'
56
56
  field :secure_sharing_text, 'string'
57
+ field :secure_sharing_text_for_embedded_booking, 'string'
57
58
  field :secure_sharing_text_for_embedded_booking_calendly, 'string'
58
59
  field :secure_sharing_text_for_embedded_booking_ghl, 'string'
59
60
  field :secure_sharing_text_for_optional_privacy_policy, 'string'
@@ -40,6 +40,7 @@ module FacebookAds
40
40
 
41
41
 
42
42
  field :active, 'bool'
43
+ field :associated_sgw_data_source_id, 'string'
43
44
  field :blocked_event_types, { list: 'string' }
44
45
  field :blocked_websites, { list: 'string' }
45
46
  field :browser_agent, { list: 'string' }
@@ -58,6 +59,7 @@ module FacebookAds
58
59
  field :instance_version, 'string'
59
60
  field :is_sgw_instance, 'bool'
60
61
  field :is_sgw_pixel_from_meta_pixel, 'bool'
62
+ field :mpc_fallback_domain, 'string'
61
63
  field :partner_name, 'string'
62
64
  field :pixel_id, 'string'
63
65
  field :sgw_account_id, 'string'
@@ -1013,6 +1013,7 @@ module FacebookAds
1013
1013
  api.has_param :custom_disclaimer, 'object'
1014
1014
  api.has_param :follow_up_action_url, 'string'
1015
1015
  api.has_param :is_for_canvas, 'bool'
1016
+ api.has_param :is_lead_capture_ai_agent_enabled, 'bool'
1016
1017
  api.has_param :is_optimized_for_quality, 'bool'
1017
1018
  api.has_param :is_phone_sms_verify_enabled, 'bool'
1018
1019
  api.has_param :locale, { enum: -> { LeadgenForm::LOCALE }}
@@ -1341,6 +1342,7 @@ module FacebookAds
1341
1342
  api.has_param :privacy, 'string'
1342
1343
  api.has_param :profile_id, 'int'
1343
1344
  api.has_param :provenance_info, 'hash'
1345
+ api.has_param :provenance_metadata, 'hash'
1344
1346
  api.has_param :proxied_app_id, 'string'
1345
1347
  api.has_param :published, 'bool'
1346
1348
  api.has_param :qn, 'string'
@@ -288,7 +288,7 @@ module FacebookAds
288
288
  end
289
289
 
290
290
  has_edge :geolocated_items_batch do |edge|
291
- edge.post 'ProductCatalog' do |api|
291
+ edge.post do |api|
292
292
  api.has_param :allow_upsert, 'bool'
293
293
  api.has_param :item_type, 'string'
294
294
  api.has_param :requests, 'hash'
@@ -401,6 +401,7 @@ module FacebookAds
401
401
  "ITEM_OVERRIDE_NOT_VISIBLE",
402
402
  "ITEM_PRICE_NOT_POSITIVE",
403
403
  "ITEM_STALE_OUT_OF_STOCK",
404
+ "ITEM_WITHOUT_VIDEO",
404
405
  "MARKETPLACE_DISABLED_BY_USER",
405
406
  "MARKETPLACE_NOT_SHIPPED_ITEM",
406
407
  "MARKETPLACE_PARTNER_AUCTION_NO_BID_CLOSE_TIME",
@@ -24,6 +24,7 @@ module FacebookAds
24
24
  "AUDIENCE_NETWORK",
25
25
  "FACEBOOK",
26
26
  "INSTAGRAM",
27
+ "THREADS",
27
28
  ]
28
29
 
29
30
  STATUS = [
@@ -533,6 +533,7 @@ module FacebookAds
533
533
  api.has_param :privacy, 'string'
534
534
  api.has_param :profile_id, 'int'
535
535
  api.has_param :provenance_info, 'hash'
536
+ api.has_param :provenance_metadata, 'hash'
536
537
  api.has_param :proxied_app_id, 'string'
537
538
  api.has_param :published, 'bool'
538
539
  api.has_param :qn, 'string'
@@ -37,6 +37,11 @@ module FacebookAds
37
37
  "UNTIERED",
38
38
  ]
39
39
 
40
+ WHATSAPP_MANAGER_MARKETING_MESSAGES_MAX_PRICE_ENROLL_STATUS = [
41
+ "OPT_IN",
42
+ "OPT_OUT",
43
+ ]
44
+
40
45
  TASKS = [
41
46
  "DEVELOP",
42
47
  "MANAGE",
@@ -120,6 +125,7 @@ module FacebookAds
120
125
  field :template_auto_archival_enabled, 'bool'
121
126
  field :timezone_id, 'string'
122
127
  field :whatsapp_business_manager_messaging_limit, { enum: -> { WHATSAPP_BUSINESS_MANAGER_MESSAGING_LIMIT }}
128
+ field :whatsapp_manager_marketing_messages_max_price_enroll_status, 'string'
123
129
  has_no_delete
124
130
 
125
131
  has_edge :activities do |edge|
@@ -271,6 +277,7 @@ module FacebookAds
271
277
  api.has_param :is_primary_device_delivery_only, 'bool'
272
278
  api.has_param :language, 'string'
273
279
  api.has_param :library_template_body_inputs, 'hash'
280
+ api.has_param :library_template_body_param_inputs, { list: 'hash' }
274
281
  api.has_param :library_template_button_inputs, { list: 'hash' }
275
282
  api.has_param :library_template_name, 'string'
276
283
  api.has_param :message_send_ttl_seconds, 'int'
@@ -7,6 +7,6 @@
7
7
  # FB:AUTOGEN
8
8
 
9
9
  module FacebookAds
10
- VERSION = '25.0.3'
10
+ VERSION = '25.0.4'
11
11
  API_VERSION = '25.0'
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facebookbusiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 25.0.3
4
+ version: 25.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facebook
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-08 00:00:00.000000000 Z
11
+ date: 2026-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capi_param_builder_ruby
@@ -298,6 +298,8 @@ files:
298
298
  - lib/facebook_ads/ad_objects/ad_account_default_objective.rb
299
299
  - lib/facebook_ads/ad_objects/ad_account_delivery_estimate.rb
300
300
  - lib/facebook_ads/ad_objects/ad_account_dsa_recommendations.rb
301
+ - lib/facebook_ads/ad_objects/ad_account_feature_preferences.rb
302
+ - lib/facebook_ads/ad_objects/ad_account_feature_preferences_post.rb
301
303
  - lib/facebook_ads/ad_objects/ad_account_ios_fourteen_campaign_limits.rb
302
304
  - lib/facebook_ads/ad_objects/ad_account_live_video_advertiser.rb
303
305
  - lib/facebook_ads/ad_objects/ad_account_marketing_messages_settings.rb
@@ -371,6 +373,7 @@ files:
371
373
  - lib/facebook_ads/ad_objects/ad_campaign_delivery_stats_get.rb
372
374
  - lib/facebook_ads/ad_objects/ad_campaign_delivery_stats_unsupported_reasons.rb
373
375
  - lib/facebook_ads/ad_objects/ad_campaign_frequency_control_specs.rb
376
+ - lib/facebook_ads/ad_objects/ad_campaign_goal.rb
374
377
  - lib/facebook_ads/ad_objects/ad_campaign_group.rb
375
378
  - lib/facebook_ads/ad_objects/ad_campaign_group_advantage_state.rb
376
379
  - lib/facebook_ads/ad_objects/ad_campaign_group_agency_fee_config_for_api.rb
@@ -845,7 +848,6 @@ files:
845
848
  - lib/facebook_ads/ad_objects/ig_refresh_access_token_for_ig_only_api.rb
846
849
  - lib/facebook_ads/ad_objects/ig_resumable_video_upload_status.rb
847
850
  - lib/facebook_ads/ad_objects/ig_shopping_product_appeal.rb
848
- - lib/facebook_ads/ad_objects/ig_shopping_review_status.rb
849
851
  - lib/facebook_ads/ad_objects/ig_shopping_review_status_onsite_eligibility.rb
850
852
  - lib/facebook_ads/ad_objects/ig_shopping_review_status_reason_with_help_message.rb
851
853
  - lib/facebook_ads/ad_objects/ig_upcoming_event.rb