From 23802e815cf6b21aa6a80120bc9faeb98abaa05e Mon Sep 17 00:00:00 2001 From: Satwika Reddy Maddi Date: Wed, 9 Oct 2024 10:32:51 -0700 Subject: [PATCH] Auto-generated ruby SDK code update Summary: ignore-conflict-markers Reviewed By: yoongyj Differential Revision: D64084365 fbshipit-source-id: 5f2c6e07cd604f768a34d979b69c9657672116a6 --- examples/AdAccountAdCreativesEdge.rb | 35 ---------- examples/AdAccountAdCreativesPost.rb | 36 ---------- ...dAccountAdCreativesPostCreateAdCreative.rb | 35 ---------- ...ntAdCreativesPostCreateAdCreativeCanvas.rb | 36 ---------- ...stCreateAdCreativeCustomizationCanvasDV.rb | 36 ---------- ...reateAdCreativeCustomizationCanvasImage.rb | 36 ---------- ...reateAdCreativeCustomizationCanvasVideo.rb | 36 ---------- examples/AdAccountAdSetsPost2CreateMAIA.rb | 43 ------------ examples/AdAccountAdSetsPostAdSetCreateCpa.rb | 47 -------------- ...ccountAdSetsPostAdSetCreateCpaAppEvents.rb | 45 ------------- .../AdAccountAdSetsPostBehaviorTargeting.rb | 41 ------------ examples/AdAccountAdSetsPostBidMultiplier.rb | 44 ------------- examples/AdAccountAdSetsPostCreateAdSet.rb | 44 ------------- ...dAccountAdSetsPostCreateAudienceNetwork.rb | 41 ------------ examples/AdAccountAdSetsPostDailyBudget20.rb | 44 ------------- ...AdAccountAdSetsPostDemographicTargeting.rb | 43 ------------ .../AdAccountAdSetsPostInterestTargeting.rb | 43 ------------ ...SetsPostLifetimeBudget200Duration10Days.rb | 44 ------------- ...AccountAdSetsPostOptimizePostEngagement.rb | 44 ------------- examples/AdAccountAdSetsPostPageLikes.rb | 43 ------------ .../AdAccountAdSetsPostPlacementTargeting.rb | 42 ------------ examples/AdAccountAdSetsPostReach.rb | 43 ------------ examples/AdAccountAdVideosPost.rb | 35 ---------- examples/AdAccountAdsPixelEdgeGetPixelCode.rb | 32 --------- examples/AdAccountAdsPixelsPost.rb | 35 ---------- examples/AdAccountAdsPost.rb | 38 ----------- examples/AdAccountAdsPostAdsRedownload.rb | 39 ----------- .../AdAccountAdsPostTrackingPostEngagement.rb | 39 ----------- examples/AdAccountCampaignsEdge.rb | 36 ---------- examples/AdAccountCampaignsPostLinkClicks.rb | 38 ----------- examples/AdAccountCustomAudiencesEdge.rb | 35 ---------- ...untCustomAudiencesEdgeDataSourceSubtype.rb | 35 ---------- ...CustomAudiencesPostCreateCustomAudience.rb | 38 ----------- ...cEventValueBasedLookalikeCustomAudience.rb | 37 ----------- ...ynamicValueBasedLookalikeCustomAudience.rb | 37 ----------- ...encesPostPlatformCustomAudienceMACARule.rb | 37 ----------- ...ustomAudiencesPostPlatformECAExclusions.rb | 37 ----------- ...tomAudiencesPostPlatformECAMultiFilters.rb | 37 ----------- ...ustomAudiencesPostPlatformECAMultiPages.rb | 37 ----------- ...cesPostPlatformEngagementCustomAudience.rb | 37 ----------- ...iencesPostPlatformWebsiteCustomAudience.rb | 37 ----------- ...omAudiencesPostValueBasedCustomAudience.rb | 38 ----------- ...esPostValueBasedLookalikeCustomAudience.rb | 38 ----------- examples/AdAccountGeneratePreviewsEdge.rb | 37 ----------- ...tGeneratePreviewsEdgeDesktopWithStoryId.rb | 37 ----------- ...tGeneratePreviewsEdgeInstagramStandards.rb | 37 ----------- ...ratePreviewsEdgeMaiaWithObjectStorySpec.rb | 37 ----------- examples/AdAccountNode.rb | 32 --------- ...roductAudiencesPostIphoneViewNoPurchase.rb | 38 ----------- ...AdAccountProductAudiencesPostNoPurchase.rb | 38 ----------- examples/AdAccountReachEstimate.rb | 36 ---------- examples/AdCampaignGroupAdsEdge.rb | 35 ---------- ...nGroupAdsEdgeAdgroupsWithStatusArchived.rb | 36 ---------- examples/AdCampaignGroupAdsetsEdge.rb | 35 ---------- examples/AdCampaignNode.rb | 32 --------- examples/AdCampaignPost.rb | 34 ---------- examples/AdCampaignPostAdsetUpdateCpa.rb | 34 ---------- examples/AdCreativeNode.rb | 32 --------- examples/AdCreativeNodeRead.rb | 32 --------- ...AdCreativeNodeReadInstagramPermalinkUrl.rb | 32 --------- examples/AdCreativePreviewsEdge.rb | 37 ----------- examples/AdCreativePreviewsEdgePreview.rb | 36 ---------- ...AdCreativePreviewsEdgePreviewDynamicAds.rb | 37 ----------- ...EdgePreviewDynamicAdsWithCustomizations.rb | 38 ----------- examples/AdgroupLeadsEdgeAdgroupLeads.rb | 35 ---------- examples/AdgroupLeadsEdgeAdgroupLeadsDPA.rb | 35 ---------- .../AdgroupLeadsEdgeAdgroupLeadsFiltered.rb | 36 ---------- examples/AdgroupPost.rb | 34 ---------- examples/AdgroupPostUpdateStatus.rb | 34 ---------- examples/AdsInsightsEdgeAdCampaignInsights.rb | 36 ---------- examples/AdsPixelEventsPost.rb | 35 ---------- examples/AdsPixelEventsPostCustom.rb | 65 ------------------- examples/AdsPixelSharedAccountsEdge.rb | 36 ---------- examples/AdsPixelSharedAccountsPost.rb | 36 ---------- examples/AdsPixelSharedAgenciesEdge.rb | 35 ---------- examples/CustomAudienceDelete.rb | 35 ---------- examples/CustomAudienceNode.rb | 32 --------- examples/CustomAudienceNodeReadRule.rb | 32 --------- examples/CustomAudiencePost.rb | 34 ---------- examples/CustomAudienceUsersPost.rb | 35 ---------- .../CustomAudienceUsersPostCrossPlatform.rb | 35 ---------- .../OfflineConversionsCreateOfflineSet.rb | 36 ---------- examples/PageFeedEdge.rb | 35 ---------- examples/PageFeedPost.rb | 35 ---------- examples/PageFeedPostFeedImageDeepLink.rb | 36 ---------- examples/PageNode.rb | 36 ---------- examples/PageNodePageSearch.rb | 32 --------- .../PagePageWhatsAppNumberVerificationPost.rb | 36 ---------- examples/PagePhotosEdge.rb | 35 ---------- examples/PagePhotosPost.rb | 36 ---------- examples/PagePictureEdge.rb | 36 ---------- examples/PagePostCommentsPost.rb | 35 ---------- examples/PagePostDelete.rb | 35 ---------- examples/PagePostNode.rb | 32 --------- examples/PagePostPost.rb | 34 ---------- examples/PagePostsEdge.rb | 35 ---------- .../PagePostsEdgePagePostCreateCarousel.rb | 40 ------------ examples/PageRolesEdge.rb | 35 ---------- examples/PageSubscribedAppsPost.rb | 35 ---------- examples/ProductCatalogEventStatsEdge.rb | 35 ---------- examples/ProductCatalogHotelsPost.rb | 44 ------------- ...ogHotelsPostUpdateHotelsCatalogSettings.rb | 34 ---------- ...oductCatalogProductFeedsPostProductFeed.rb | 36 ---------- .../ProductCatalogProductSetsPostHotelSet.rb | 36 ---------- ...ProductCatalogProductSetsPostProductSet.rb | 36 ---------- examples/UserAccountsEdge.rb | 35 ---------- examples/UserAdAccountsEdge.rb | 35 ---------- examples/UserLeadGenInfoNode.rb | 32 --------- examples/UserNode.rb | 32 --------- examples/VideoThumbnailsEdge.rb | 35 ---------- lib/facebook_ads/ad_objects/ad.rb | 1 + lib/facebook_ads/ad_objects/ad_account.rb | 24 +++++-- .../ad_objects/ad_account_ad_rules_history.rb | 4 ++ .../ad_objects/ad_account_ad_volume.rb | 21 ++++++ ...rb => ad_account_live_video_advertiser.rb} | 11 ++-- .../ad_account_targeting_unified.rb | 1 + lib/facebook_ads/ad_objects/ad_activity.rb | 3 + lib/facebook_ads/ad_objects/ad_creative.rb | 1 + .../ad_creative_branded_content_ads.rb | 2 + ...d_creative_branded_content_ads_partners.rb | 1 + .../ad_objects/ad_creative_features_spec.rb | 10 +++ .../ad_creative_object_story_spec.rb | 3 +- ...ettings.rb => ad_creative_product_data.rb} | 9 +-- lib/facebook_ads/ad_objects/ad_preview.rb | 1 + .../ad_objects/ad_promoted_object.rb | 3 + lib/facebook_ads/ad_objects/ad_rule.rb | 1 + .../ad_objects/ad_rule_history.rb | 4 ++ lib/facebook_ads/ad_objects/ad_set.rb | 4 ++ lib/facebook_ads/ad_objects/ad_video.rb | 4 +- lib/facebook_ads/ad_objects/ads_insights.rb | 7 +- ...panel_api_report.rb => ads_quick_views.rb} | 16 ++--- .../ad_objects/ads_user_settings.rb | 2 + .../ads_value_adjustment_rule_collection.rb | 2 +- .../ad_objects/alm_ad_account_info.rb | 1 + lib/facebook_ads/ad_objects/application.rb | 30 ++------- lib/facebook_ads/ad_objects/business.rb | 4 +- lib/facebook_ads/ad_objects/campaign.rb | 2 + .../catalog_item_rejection_reasons.rb | 11 +--- .../ad_objects/ctwa_whats_app_numbers_info.rb | 1 + .../ad_objects/custom_audience.rb | 15 +++++ .../ad_objects/extended_credit.rb | 13 ++++ lib/facebook_ads/ad_objects/group.rb | 24 +------ lib/facebook_ads/ad_objects/hotel.rb | 5 ++ .../ad_objects/ig_media_for_ig_only_api.rb | 8 +++ .../ad_objects/ig_user_for_ig_only_api.rb | 6 ++ .../ad_objects/insights_result.rb | 62 ++++++++++++------ .../ad_objects/instagram_insights_result.rb | 1 + .../ad_objects/messenger_business_template.rb | 33 ++++++++++ lib/facebook_ads/ad_objects/page.rb | 14 ++-- .../partnership_ad_content_search_media.rb | 3 + lib/facebook_ads/ad_objects/placement.rb | 52 +++++++++++++++ .../ad_objects/product_catalog.rb | 6 ++ .../product_catalog_diagnostic_group.rb | 36 +++++----- lib/facebook_ads/ad_objects/product_feed.rb | 1 + lib/facebook_ads/ad_objects/product_item.rb | 9 +++ .../ad_objects/saved_message_response.rb | 1 - lib/facebook_ads/ad_objects/user.rb | 14 ++-- lib/facebook_ads/ad_objects/vehicle.rb | 5 ++ lib/facebook_ads/ad_objects/vehicle_offer.rb | 5 ++ .../ad_objects/whats_app_business_account.rb | 15 +++++ lib/facebook_ads/version.rb | 4 +- 161 files changed, 368 insertions(+), 4207 deletions(-) delete mode 100644 examples/AdAccountAdCreativesEdge.rb delete mode 100644 examples/AdAccountAdCreativesPost.rb delete mode 100644 examples/AdAccountAdCreativesPostCreateAdCreative.rb delete mode 100644 examples/AdAccountAdCreativesPostCreateAdCreativeCanvas.rb delete mode 100644 examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasDV.rb delete mode 100644 examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasImage.rb delete mode 100644 examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasVideo.rb delete mode 100644 examples/AdAccountAdSetsPost2CreateMAIA.rb delete mode 100644 examples/AdAccountAdSetsPostAdSetCreateCpa.rb delete mode 100644 examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.rb delete mode 100644 examples/AdAccountAdSetsPostBehaviorTargeting.rb delete mode 100644 examples/AdAccountAdSetsPostBidMultiplier.rb delete mode 100644 examples/AdAccountAdSetsPostCreateAdSet.rb delete mode 100644 examples/AdAccountAdSetsPostCreateAudienceNetwork.rb delete mode 100644 examples/AdAccountAdSetsPostDailyBudget20.rb delete mode 100644 examples/AdAccountAdSetsPostDemographicTargeting.rb delete mode 100644 examples/AdAccountAdSetsPostInterestTargeting.rb delete mode 100644 examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.rb delete mode 100644 examples/AdAccountAdSetsPostOptimizePostEngagement.rb delete mode 100644 examples/AdAccountAdSetsPostPageLikes.rb delete mode 100644 examples/AdAccountAdSetsPostPlacementTargeting.rb delete mode 100644 examples/AdAccountAdSetsPostReach.rb delete mode 100644 examples/AdAccountAdVideosPost.rb delete mode 100644 examples/AdAccountAdsPixelEdgeGetPixelCode.rb delete mode 100644 examples/AdAccountAdsPixelsPost.rb delete mode 100644 examples/AdAccountAdsPost.rb delete mode 100644 examples/AdAccountAdsPostAdsRedownload.rb delete mode 100644 examples/AdAccountAdsPostTrackingPostEngagement.rb delete mode 100644 examples/AdAccountCampaignsEdge.rb delete mode 100644 examples/AdAccountCampaignsPostLinkClicks.rb delete mode 100644 examples/AdAccountCustomAudiencesEdge.rb delete mode 100644 examples/AdAccountCustomAudiencesEdgeDataSourceSubtype.rb delete mode 100644 examples/AdAccountCustomAudiencesPostCreateCustomAudience.rb delete mode 100644 examples/AdAccountCustomAudiencesPostDynamicEventValueBasedLookalikeCustomAudience.rb delete mode 100644 examples/AdAccountCustomAudiencesPostDynamicValueBasedLookalikeCustomAudience.rb delete mode 100644 examples/AdAccountCustomAudiencesPostPlatformCustomAudienceMACARule.rb delete mode 100644 examples/AdAccountCustomAudiencesPostPlatformECAExclusions.rb delete mode 100644 examples/AdAccountCustomAudiencesPostPlatformECAMultiFilters.rb delete mode 100644 examples/AdAccountCustomAudiencesPostPlatformECAMultiPages.rb delete mode 100644 examples/AdAccountCustomAudiencesPostPlatformEngagementCustomAudience.rb delete mode 100644 examples/AdAccountCustomAudiencesPostPlatformWebsiteCustomAudience.rb delete mode 100644 examples/AdAccountCustomAudiencesPostValueBasedCustomAudience.rb delete mode 100644 examples/AdAccountCustomAudiencesPostValueBasedLookalikeCustomAudience.rb delete mode 100644 examples/AdAccountGeneratePreviewsEdge.rb delete mode 100644 examples/AdAccountGeneratePreviewsEdgeDesktopWithStoryId.rb delete mode 100644 examples/AdAccountGeneratePreviewsEdgeInstagramStandards.rb delete mode 100644 examples/AdAccountGeneratePreviewsEdgeMaiaWithObjectStorySpec.rb delete mode 100644 examples/AdAccountNode.rb delete mode 100644 examples/AdAccountProductAudiencesPostIphoneViewNoPurchase.rb delete mode 100644 examples/AdAccountProductAudiencesPostNoPurchase.rb delete mode 100644 examples/AdAccountReachEstimate.rb delete mode 100644 examples/AdCampaignGroupAdsEdge.rb delete mode 100644 examples/AdCampaignGroupAdsEdgeAdgroupsWithStatusArchived.rb delete mode 100644 examples/AdCampaignGroupAdsetsEdge.rb delete mode 100644 examples/AdCampaignNode.rb delete mode 100644 examples/AdCampaignPost.rb delete mode 100644 examples/AdCampaignPostAdsetUpdateCpa.rb delete mode 100644 examples/AdCreativeNode.rb delete mode 100644 examples/AdCreativeNodeRead.rb delete mode 100644 examples/AdCreativeNodeReadInstagramPermalinkUrl.rb delete mode 100644 examples/AdCreativePreviewsEdge.rb delete mode 100644 examples/AdCreativePreviewsEdgePreview.rb delete mode 100644 examples/AdCreativePreviewsEdgePreviewDynamicAds.rb delete mode 100644 examples/AdCreativePreviewsEdgePreviewDynamicAdsWithCustomizations.rb delete mode 100644 examples/AdgroupLeadsEdgeAdgroupLeads.rb delete mode 100644 examples/AdgroupLeadsEdgeAdgroupLeadsDPA.rb delete mode 100644 examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.rb delete mode 100644 examples/AdgroupPost.rb delete mode 100644 examples/AdgroupPostUpdateStatus.rb delete mode 100644 examples/AdsInsightsEdgeAdCampaignInsights.rb delete mode 100644 examples/AdsPixelEventsPost.rb delete mode 100644 examples/AdsPixelEventsPostCustom.rb delete mode 100644 examples/AdsPixelSharedAccountsEdge.rb delete mode 100644 examples/AdsPixelSharedAccountsPost.rb delete mode 100644 examples/AdsPixelSharedAgenciesEdge.rb delete mode 100644 examples/CustomAudienceDelete.rb delete mode 100644 examples/CustomAudienceNode.rb delete mode 100644 examples/CustomAudienceNodeReadRule.rb delete mode 100644 examples/CustomAudiencePost.rb delete mode 100644 examples/CustomAudienceUsersPost.rb delete mode 100644 examples/CustomAudienceUsersPostCrossPlatform.rb delete mode 100644 examples/OfflineConversionsCreateOfflineSet.rb delete mode 100644 examples/PageFeedEdge.rb delete mode 100644 examples/PageFeedPost.rb delete mode 100644 examples/PageFeedPostFeedImageDeepLink.rb delete mode 100644 examples/PageNode.rb delete mode 100644 examples/PageNodePageSearch.rb delete mode 100644 examples/PagePageWhatsAppNumberVerificationPost.rb delete mode 100644 examples/PagePhotosEdge.rb delete mode 100644 examples/PagePhotosPost.rb delete mode 100644 examples/PagePictureEdge.rb delete mode 100644 examples/PagePostCommentsPost.rb delete mode 100644 examples/PagePostDelete.rb delete mode 100644 examples/PagePostNode.rb delete mode 100644 examples/PagePostPost.rb delete mode 100644 examples/PagePostsEdge.rb delete mode 100644 examples/PagePostsEdgePagePostCreateCarousel.rb delete mode 100644 examples/PageRolesEdge.rb delete mode 100644 examples/PageSubscribedAppsPost.rb delete mode 100644 examples/ProductCatalogEventStatsEdge.rb delete mode 100644 examples/ProductCatalogHotelsPost.rb delete mode 100644 examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.rb delete mode 100644 examples/ProductCatalogProductFeedsPostProductFeed.rb delete mode 100644 examples/ProductCatalogProductSetsPostHotelSet.rb delete mode 100644 examples/ProductCatalogProductSetsPostProductSet.rb delete mode 100644 examples/UserAccountsEdge.rb delete mode 100644 examples/UserAdAccountsEdge.rb delete mode 100644 examples/UserLeadGenInfoNode.rb delete mode 100644 examples/UserNode.rb delete mode 100644 examples/VideoThumbnailsEdge.rb rename lib/facebook_ads/ad_objects/{external_event_source_da_stats_result.rb => ad_account_live_video_advertiser.rb} (64%) rename lib/facebook_ads/ad_objects/{dog_notification_settings.rb => ad_creative_product_data.rb} (75%) rename lib/facebook_ads/ad_objects/{panel_api_report.rb => ads_quick_views.rb} (65%) create mode 100644 lib/facebook_ads/ad_objects/messenger_business_template.rb create mode 100644 lib/facebook_ads/ad_objects/placement.rb diff --git a/examples/AdAccountAdCreativesEdge.rb b/examples/AdAccountAdCreativesEdge.rb deleted file mode 100644 index cbe3c6ca..00000000 --- a/examples/AdAccountAdCreativesEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adcreativess = ad_account.adcreatives({ - fields: { 'name' }, -}) \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPost.rb b/examples/AdAccountAdCreativesPost.rb deleted file mode 100644 index 6e299484..00000000 --- a/examples/AdAccountAdCreativesPost.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adcreatives = ad_account.adcreatives.create({ - name: 'Sample Promoted Post', - object_story_id: '_', -}) \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreative.rb b/examples/AdAccountAdCreativesPostCreateAdCreative.rb deleted file mode 100644 index 873b5f17..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreative.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adcreatives = ad_account.adcreatives.create({ - object_story_id: '_', -}) \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreativeCanvas.rb b/examples/AdAccountAdCreativesPostCreateAdCreativeCanvas.rb deleted file mode 100644 index 487dfeb1..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreativeCanvas.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adcreatives = ad_account.adcreatives.create({ - image_hash: '', - object_story_spec: {'page_id':'','link_data':{'image_hash':'','link':'','name':'Creative message','call_to_action':{'type':'LEARN_MORE'}}}, -}) \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasDV.rb b/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasDV.rb deleted file mode 100644 index 42d94acd..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasDV.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adcreatives = ad_account.adcreatives.create({ - object_story_spec: {'page_id':'','template_data':{'format_option':'collection_video','link':'','name':'English Creative title','message':'English Creative message','call_to_action':{'type':'LEARN_MORE'},'retailer_item_ids':[0,0,0,0],'customization_rules_spec':[{'customization_spec':{'language':'en_XX'}},{'customization_spec':{'language':'fr_XX'},'link':'','name':'French Creative title','message':'French Creative message'}]}}, - product_set_id: '', -}) \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasImage.rb b/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasImage.rb deleted file mode 100644 index 1d9ab474..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasImage.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adcreatives = ad_account.adcreatives.create({ - object_story_spec: {'page_id':'','link_data':{'picture':'','link':'','name':'English Creative title','message':'English Creative message','call_to_action':{'type':'LEARN_MORE'},'retailer_item_ids':[0,0,0,0],'customization_rules_spec':[{'customization_spec':{'language':'en_XX'}},{'customization_spec':{'language':'fr_XX'},'picture':'','link':'','name':'French Creative title','message':'French Creative message'}]}}, - product_set_id: '', -}) \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasVideo.rb b/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasVideo.rb deleted file mode 100644 index 6d1d22f2..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasVideo.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adcreatives = ad_account.adcreatives.create({ - object_story_spec: {'page_id':'','video_data':{'video_id':'','image_url':'','title':'English Creative title','message':'English Creative message','call_to_action':{'type':'LEARN_MORE','value':{'link':''}},'retailer_item_ids':[0,0,0,0],'customization_rules_spec':[{'customization_spec':{'language':'en_XX'}},{'customization_spec':{'language':'fr_XX'},'video_id':'','picture':'','link':'','name':'French Creative title','message':'French Creative message'}]}}, - product_set_id: '', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPost2CreateMAIA.rb b/examples/AdAccountAdSetsPost2CreateMAIA.rb deleted file mode 100644 index d3eee18d..00000000 --- a/examples/AdAccountAdSetsPost2CreateMAIA.rb +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'Mobile App Installs Ad Set', - daily_budget: '1000', - bid_amount: '2', - billing_event: 'IMPRESSIONS', - optimization_goal: 'APP_INSTALLS', - campaign_id: '', - promoted_object: {'application_id':'','object_store_url':''}, - targeting: {'device_platforms':['mobile'],'facebook_positions':['feed'],'geo_locations':{'countries':['US']},'publisher_platforms':['facebook','audience_network'],'user_os':['IOS']}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostAdSetCreateCpa.rb b/examples/AdAccountAdSetsPostAdSetCreateCpa.rb deleted file mode 100644 index 18fd27b9..00000000 --- a/examples/AdAccountAdSetsPostAdSetCreateCpa.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'A CPA Ad Set', - campaign_id: '', - daily_budget: '5000', - start_time: '2024-06-18T16:39:15-0700', - end_time: '2024-06-25T16:39:15-0700', - billing_event: 'IMPRESSIONS', - optimization_goal: 'REACH', - bid_amount: '1000', - promoted_object: {'page_id':''}, - targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US']}}, - user_os: 'iOS', - publisher_platforms: 'facebook', - device_platforms: 'mobile', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.rb b/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.rb deleted file mode 100644 index 60cdf084..00000000 --- a/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'A CPA Ad Set optimized for App Events', - campaign_id: '', - daily_budget: '300', - start_time: '2024-06-18T16:40:02-0700', - end_time: '2024-06-25T16:40:02-0700', - billing_event: 'IMPRESSIONS', - optimization_goal: 'OFFSITE_CONVERSIONS', - bid_amount: '100', - status: 'PAUSED', - promoted_object: {'application_id':'','object_store_url':'','custom_event_type':'PURCHASE'}, - targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US']},'user_os':['iOS']}, -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostBehaviorTargeting.rb b/examples/AdAccountAdSetsPostBehaviorTargeting.rb deleted file mode 100644 index 5ca72356..00000000 --- a/examples/AdAccountAdSetsPostBehaviorTargeting.rb +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My AdSet', - optimization_goal: 'REACH', - billing_event: 'IMPRESSIONS', - bid_amount: '2', - daily_budget: '1000', - campaign_id: '', - targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US']},'behaviors':[{'id':6007101597783,'name':'Business Travelers'},{'id':6004386044572,'name':'Android Owners (All)'}]}, -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostBidMultiplier.rb b/examples/AdAccountAdSetsPostBidMultiplier.rb deleted file mode 100644 index 7e3f90de..00000000 --- a/examples/AdAccountAdSetsPostBidMultiplier.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My Adset with bid multiplier', - campaign_id: '', - daily_budget: '3000', - billing_event: 'IMPRESSIONS', - optimization_goal: 'OFFSITE_CONVERSIONS', - bid_amount: '500', - bid_adjustments: {'user_groups':{'gender':{'male':0.8,'female':1}}}, - promoted_object: {'product_set_id':'','custom_event_type':'ADD_TO_CART'}, - targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US']}}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostCreateAdSet.rb b/examples/AdAccountAdSetsPostCreateAdSet.rb deleted file mode 100644 index 3a5ecdbc..00000000 --- a/examples/AdAccountAdSetsPostCreateAdSet.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My First AdSet', - lifetime_budget: '20000', - start_time: '2024-06-18T16:38:30-0700', - end_time: '2024-06-25T16:38:30-0700', - campaign_id: '', - bid_amount: '500', - billing_event: 'IMPRESSIONS', - optimization_goal: 'POST_ENGAGEMENT', - targeting: {'age_min':20,'age_max':24,'behaviors':[{'id':6002714895372,'name':'All travelers'}],'genders':[1],'geo_locations':{'countries':['US'],'regions':[{'key':'4081'}],'cities':[{'key':'777934','radius':10,'distance_unit':'mile'}]},'interests':[{'id':'','name':''}],'life_events':[{'id':6002714398172,'name':'Newlywed (1 year)'}],'facebook_positions':['feed'],'publisher_platforms':['facebook','audience_network']}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostCreateAudienceNetwork.rb b/examples/AdAccountAdSetsPostCreateAudienceNetwork.rb deleted file mode 100644 index f68c77b7..00000000 --- a/examples/AdAccountAdSetsPostCreateAudienceNetwork.rb +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My Ad Set', - optimization_goal: 'LINK_CLICKS', - billing_event: 'LINK_CLICKS', - bid_amount: '2', - daily_budget: '1000', - campaign_id: '', - targeting: {'device_platforms':['mobile'],'geo_locations':{'countries':['US']},'publisher_platforms':['facebook','audience_network'],'facebook_positions':['feed']}, -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostDailyBudget20.rb b/examples/AdAccountAdSetsPostDailyBudget20.rb deleted file mode 100644 index 53ac62f4..00000000 --- a/examples/AdAccountAdSetsPostDailyBudget20.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My First Adset', - daily_budget: '2000', - start_time: '2024-06-11T16:39:34-0700', - end_time: '2024-06-18T16:39:34-0700', - campaign_id: '', - bid_amount: '100', - billing_event: 'LINK_CLICKS', - optimization_goal: 'LINK_CLICKS', - targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US']}}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostDemographicTargeting.rb b/examples/AdAccountAdSetsPostDemographicTargeting.rb deleted file mode 100644 index 7e81355a..00000000 --- a/examples/AdAccountAdSetsPostDemographicTargeting.rb +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My First AdSet', - daily_budget: '10000', - bid_amount: '300', - billing_event: 'IMPRESSIONS', - optimization_goal: 'REACH', - campaign_id: '', - promoted_object: {'page_id':''}, - targeting: {'facebook_positions':['feed'],'age_max':24,'age_min':20,'behaviors':[{'id':6002714895372,'name':'All travelers'}],'device_platforms':['mobile'],'genders':[1],'geo_locations':{'countries':['US'],'regions':[{'key':'4081'}],'cities':[{'key':777934,'radius':10,'distance_unit':'mile'}]},'interests':[{'id':'','name':''}],'life_events':[{'id':6002714398172,'name':'Newlywed (1 year)'}],'publisher_platforms':['facebook','audience_network']}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostInterestTargeting.rb b/examples/AdAccountAdSetsPostInterestTargeting.rb deleted file mode 100644 index aec2f9fa..00000000 --- a/examples/AdAccountAdSetsPostInterestTargeting.rb +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My First AdSet', - daily_budget: '10000', - bid_amount: '300', - billing_event: 'IMPRESSIONS', - optimization_goal: 'REACH', - campaign_id: '', - promoted_object: {'page_id':''}, - targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US'],'regions':[{'key':'4081'}],'cities':[{'key':777934,'radius':10,'distance_unit':'mile'}]},'genders':[1],'age_max':24,'age_min':20,'publisher_platforms':['facebook','audience_network'],'device_platforms':['mobile'],'flexible_spec':[{'interests':[{'id':'','name':''}]}]}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.rb b/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.rb deleted file mode 100644 index 97ed9e84..00000000 --- a/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My First Adset', - lifetime_budget: '20000', - start_time: '2024-06-11T16:39:43-0700', - end_time: '2024-06-21T16:39:43-0700', - campaign_id: '', - bid_amount: '100', - billing_event: 'LINK_CLICKS', - optimization_goal: 'LINK_CLICKS', - targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US']},'publisher_platforms':['facebook','audience_network']}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostOptimizePostEngagement.rb b/examples/AdAccountAdSetsPostOptimizePostEngagement.rb deleted file mode 100644 index 1bd13757..00000000 --- a/examples/AdAccountAdSetsPostOptimizePostEngagement.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My First Adset', - lifetime_budget: '20000', - start_time: '2024-06-11T16:39:52-0700', - end_time: '2024-06-21T16:39:52-0700', - campaign_id: '', - bid_amount: '500', - billing_event: 'IMPRESSIONS', - optimization_goal: 'POST_ENGAGEMENT', - targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US'],'regions':[{'key':'4081'}],'cities':[{'key':777934,'radius':10,'distance_unit':'mile'}]},'genders':[1],'age_max':24,'age_min':20,'behaviors':[{'id':6002714895372,'name':'All travelers'}],'life_events':[{'id':6002714398172,'name':'Newlywed (1 year)'}],'publisher_platforms':['facebook'],'device_platforms':['desktop']}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostPageLikes.rb b/examples/AdAccountAdSetsPostPageLikes.rb deleted file mode 100644 index 7a6b7e93..00000000 --- a/examples/AdAccountAdSetsPostPageLikes.rb +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My Reach Ad Set', - optimization_goal: 'REACH', - billing_event: 'IMPRESSIONS', - bid_amount: '2', - daily_budget: '1000', - campaign_id: '', - targeting: {'geo_locations':{'countries':['US']},'facebook_positions':['feed']}, - status: 'PAUSED', - promoted_object: {'page_id':''}, -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostPlacementTargeting.rb b/examples/AdAccountAdSetsPostPlacementTargeting.rb deleted file mode 100644 index 96fb575d..00000000 --- a/examples/AdAccountAdSetsPostPlacementTargeting.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My AdSet', - optimization_goal: 'REACH', - billing_event: 'IMPRESSIONS', - bid_amount: '2', - daily_budget: '1000', - campaign_id: '', - targeting: {'geo_locations':{'countries':['US']},'publisher_platforms':['facebook'],'facebook_positions':['feed']}, - promoted_object: {'page_id':''}, -}) \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostReach.rb b/examples/AdAccountAdSetsPostReach.rb deleted file mode 100644 index 70c23b61..00000000 --- a/examples/AdAccountAdSetsPostReach.rb +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adsets = ad_account.adsets.create({ - name: 'My Reach Ad Set', - optimization_goal: 'REACH', - billing_event: 'IMPRESSIONS', - bid_amount: '2', - daily_budget: '1000', - campaign_id: '', - targeting: {'excluded_geo_locations':{'regions':[{'key':'3847'}]},'geo_locations':{'countries':['US']},'facebook_positions':['feed']}, - status: 'PAUSED', - promoted_object: {'page_id':''}, -}) \ No newline at end of file diff --git a/examples/AdAccountAdVideosPost.rb b/examples/AdAccountAdVideosPost.rb deleted file mode 100644 index 40db05f0..00000000 --- a/examples/AdAccountAdVideosPost.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -advideos = ad_account.advideos.create({ - source: '', -}) \ No newline at end of file diff --git a/examples/AdAccountAdsPixelEdgeGetPixelCode.rb b/examples/AdAccountAdsPixelEdgeGetPixelCode.rb deleted file mode 100644 index 11b903f7..00000000 --- a/examples/AdAccountAdsPixelEdgeGetPixelCode.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ads_pixel = FacebookAds::AdsPixel.get(id ,'code') \ No newline at end of file diff --git a/examples/AdAccountAdsPixelsPost.rb b/examples/AdAccountAdsPixelsPost.rb deleted file mode 100644 index 75e945f0..00000000 --- a/examples/AdAccountAdsPixelsPost.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -adspixels = ad_account.adspixels.create({ - name: 'My WCA Pixel', -}) \ No newline at end of file diff --git a/examples/AdAccountAdsPost.rb b/examples/AdAccountAdsPost.rb deleted file mode 100644 index 79bb95c8..00000000 --- a/examples/AdAccountAdsPost.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -ads = ad_account.ads.create({ - name: 'My Ad', - adset_id: '', - creative: {'creative_id':''}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdsPostAdsRedownload.rb b/examples/AdAccountAdsPostAdsRedownload.rb deleted file mode 100644 index 2a7df10f..00000000 --- a/examples/AdAccountAdsPostAdsRedownload.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -ads = ad_account.ads.create({ - name: 'My AdGroup with Redownload', - adset_id: '', - creative: {'creative_id':''}, - redownload: '1', - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountAdsPostTrackingPostEngagement.rb b/examples/AdAccountAdsPostTrackingPostEngagement.rb deleted file mode 100644 index f34b869c..00000000 --- a/examples/AdAccountAdsPostTrackingPostEngagement.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -ads = ad_account.ads.create({ - name: 'My First Ad', - adset_id: '', - creative: {'creative_id':''}, - tracking_specs: {'action.type':'post_engagement','post':'','page':''}, - status: 'PAUSED', -}) \ No newline at end of file diff --git a/examples/AdAccountCampaignsEdge.rb b/examples/AdAccountCampaignsEdge.rb deleted file mode 100644 index acab9079..00000000 --- a/examples/AdAccountCampaignsEdge.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -campaignss = ad_account.campaigns({ - fields: { 'name''objective' }, - effective_status: ['ACTIVE','PAUSED'], -}) \ No newline at end of file diff --git a/examples/AdAccountCampaignsPostLinkClicks.rb b/examples/AdAccountCampaignsPostLinkClicks.rb deleted file mode 100644 index da8c07e8..00000000 --- a/examples/AdAccountCampaignsPostLinkClicks.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -campaigns = ad_account.campaigns.create({ - name: 'My campaign', - objective: 'OUTCOME_TRAFFIC', - status: 'PAUSED', - special_ad_categories: [], -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesEdge.rb b/examples/AdAccountCustomAudiencesEdge.rb deleted file mode 100644 index c6388944..00000000 --- a/examples/AdAccountCustomAudiencesEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiencess = ad_account.customaudiences({ - fields: { 'id' }, -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesEdgeDataSourceSubtype.rb b/examples/AdAccountCustomAudiencesEdgeDataSourceSubtype.rb deleted file mode 100644 index d4236a5f..00000000 --- a/examples/AdAccountCustomAudiencesEdgeDataSourceSubtype.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiencess = ad_account.customaudiences({ - fields: { 'data_source''subtype' }, -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostCreateCustomAudience.rb b/examples/AdAccountCustomAudiencesPostCreateCustomAudience.rb deleted file mode 100644 index 09458023..00000000 --- a/examples/AdAccountCustomAudiencesPostCreateCustomAudience.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'My new Custom Audience', - subtype: 'CUSTOM', - description: 'People who purchased on my website', - customer_file_source: 'USER_PROVIDED_ONLY', -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostDynamicEventValueBasedLookalikeCustomAudience.rb b/examples/AdAccountCustomAudiencesPostDynamicEventValueBasedLookalikeCustomAudience.rb deleted file mode 100644 index 08ffbb85..00000000 --- a/examples/AdAccountCustomAudiencesPostDynamicEventValueBasedLookalikeCustomAudience.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'Test Value-Based lookalike from Pixel', - subtype: 'LOOKALIKE', - lookalike_spec: {'origin_event_sources':[{'id':'','event_names':['AddToCart']}],'type':'custom_ratio','ratio':0.01,'country':'US'}, -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostDynamicValueBasedLookalikeCustomAudience.rb b/examples/AdAccountCustomAudiencesPostDynamicValueBasedLookalikeCustomAudience.rb deleted file mode 100644 index c3890fb9..00000000 --- a/examples/AdAccountCustomAudiencesPostDynamicValueBasedLookalikeCustomAudience.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'Test Value-Based lookalike from Pixel', - subtype: 'LOOKALIKE', - lookalike_spec: {'origin_event_sources':[{'id':''}],'type':'custom_ratio','ratio':0.01,'country':'US'}, -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformCustomAudienceMACARule.rb b/examples/AdAccountCustomAudiencesPostPlatformCustomAudienceMACARule.rb deleted file mode 100644 index d4fa8c54..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformCustomAudienceMACARule.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'My Test Website Custom Audience', - rule: {'inclusions':{'operator':'or','rules':[{'event_sources':[{'id':'','type':'app'}],'retention_seconds':8400,'filter':{'operator':'and','filters':[{'field':'event','operator':'eq','value':'fb_mobile_purchase'}]}}]}}, - prefill: '1', -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformECAExclusions.rb b/examples/AdAccountCustomAudiencesPostPlatformECAExclusions.rb deleted file mode 100644 index 95ca2727..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformECAExclusions.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'My Test Engagement Custom Audience', - rule: {'inclusions':{'operator':'or','rules':[{'event_sources':[{'id':'','type':'page'}],'retention_seconds':31536000,'filter':{'operator':'and','filters':[{'field':'event','operator':'eq','value':'page_engaged'}]}}]},'exclusions':{'operator':'or','rules':[{'event_sources':[{'id':'','type':'page'}],'retention_seconds':31536000,'filter':{'operator':'and','filters':[{'field':'event','operator':'eq','value':'page_cta_clicked'}]}}]}}, - prefill: '1', -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformECAMultiFilters.rb b/examples/AdAccountCustomAudiencesPostPlatformECAMultiFilters.rb deleted file mode 100644 index b1329dce..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformECAMultiFilters.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'My Test Engagement Custom Audience', - rule: {'inclusions':{'operator':'or','rules':[{'event_sources':[{'id':'','type':'page'}],'retention_seconds':31536000,'filter':{'operator':'and','filters':[{'field':'event','operator':'eq','value':'page_engaged'},{'field':'event','operator':'eq','value':'page_engaged'}]}}]}}, - prefill: '1', -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformECAMultiPages.rb b/examples/AdAccountCustomAudiencesPostPlatformECAMultiPages.rb deleted file mode 100644 index 25d6fd83..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformECAMultiPages.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'My Test Engagement Custom Audience', - rule: {'inclusions':{'operator':'or','rules':[{'event_sources':[{'id':'','type':'page'},{'id':'','type':'page'}],'retention_seconds':31536000,'filter':{'operator':'and','filters':[{'field':'event','operator':'eq','value':'page_engaged'}]}}]}}, - prefill: '1', -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformEngagementCustomAudience.rb b/examples/AdAccountCustomAudiencesPostPlatformEngagementCustomAudience.rb deleted file mode 100644 index b0d36536..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformEngagementCustomAudience.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'My Test Engagement Custom Audience', - rule: {'inclusions':{'operator':'or','rules':[{'event_sources':[{'id':'','type':'page'}],'retention_seconds':31536000,'filter':{'operator':'and','filters':[{'field':'event','operator':'eq','value':'page_engaged'}]}}]}}, - prefill: '1', -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformWebsiteCustomAudience.rb b/examples/AdAccountCustomAudiencesPostPlatformWebsiteCustomAudience.rb deleted file mode 100644 index 299db3af..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformWebsiteCustomAudience.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'My Test Website Custom Audience', - rule: {'inclusions':{'operator':'or','rules':[{'event_sources':[{'id':'','type':'pixel'}],'retention_seconds':8400,'filter':{'operator':'and','filters':[{'field':'url','operator':'i_contains','value':'shoes'}]}}]}}, - prefill: '1', -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostValueBasedCustomAudience.rb b/examples/AdAccountCustomAudiencesPostValueBasedCustomAudience.rb deleted file mode 100644 index d4083b9b..00000000 --- a/examples/AdAccountCustomAudiencesPostValueBasedCustomAudience.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'Value-Based Custom Audience', - subtype: 'CUSTOM', - is_value_based: '1', - customer_file_source: 'PARTNER_PROVIDED_ONLY', -}) \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostValueBasedLookalikeCustomAudience.rb b/examples/AdAccountCustomAudiencesPostValueBasedLookalikeCustomAudience.rb deleted file mode 100644 index a39592a7..00000000 --- a/examples/AdAccountCustomAudiencesPostValueBasedLookalikeCustomAudience.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -customaudiences = ad_account.customaudiences.create({ - name: 'Value-Based lookalike', - subtype: 'LOOKALIKE', - origin_audience_id: '', - lookalike_spec: {'type':'custom_ratio','ratio':0.01,'country':'US'}, -}) \ No newline at end of file diff --git a/examples/AdAccountGeneratePreviewsEdge.rb b/examples/AdAccountGeneratePreviewsEdge.rb deleted file mode 100644 index 3d6abe47..00000000 --- a/examples/AdAccountGeneratePreviewsEdge.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -generatepreviewss = ad_account.generatepreviews({ - fields: { }, - creative: '', - ad_format: '', -}) \ No newline at end of file diff --git a/examples/AdAccountGeneratePreviewsEdgeDesktopWithStoryId.rb b/examples/AdAccountGeneratePreviewsEdgeDesktopWithStoryId.rb deleted file mode 100644 index e640ee9f..00000000 --- a/examples/AdAccountGeneratePreviewsEdgeDesktopWithStoryId.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -generatepreviewss = ad_account.generatepreviews({ - fields: { }, - creative: {'object_story_id':'_'}, - ad_format: 'DESKTOP_FEED_STANDARD', -}) \ No newline at end of file diff --git a/examples/AdAccountGeneratePreviewsEdgeInstagramStandards.rb b/examples/AdAccountGeneratePreviewsEdgeInstagramStandards.rb deleted file mode 100644 index 72e00061..00000000 --- a/examples/AdAccountGeneratePreviewsEdgeInstagramStandards.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -generatepreviewss = ad_account.generatepreviews({ - fields: { }, - creative: {'instagram_actor_id':'','object_story_spec':{'link_data':{'call_to_action':{'type':'LEARN_MORE','value':{'link':''}},'caption':'www.example.com','image_hash':'','link':'','message':'Message'},'page_id':''}}, - ad_format: 'INSTAGRAM_STANDARD', -}) \ No newline at end of file diff --git a/examples/AdAccountGeneratePreviewsEdgeMaiaWithObjectStorySpec.rb b/examples/AdAccountGeneratePreviewsEdgeMaiaWithObjectStorySpec.rb deleted file mode 100644 index 067ee307..00000000 --- a/examples/AdAccountGeneratePreviewsEdgeMaiaWithObjectStorySpec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -generatepreviewss = ad_account.generatepreviews({ - fields: { }, - creative: {'object_story_spec':{'link_data':{'call_to_action':{'type':'USE_APP','value':{'link':''}},'description':'Description','link':'','message':'Message','name':'Name','picture':''},'page_id':''}}, - ad_format: 'MOBILE_FEED_STANDARD', -}) \ No newline at end of file diff --git a/examples/AdAccountNode.rb b/examples/AdAccountNode.rb deleted file mode 100644 index 625d6fa9..00000000 --- a/examples/AdAccountNode.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id ,'name') \ No newline at end of file diff --git a/examples/AdAccountProductAudiencesPostIphoneViewNoPurchase.rb b/examples/AdAccountProductAudiencesPostIphoneViewNoPurchase.rb deleted file mode 100644 index 1f7124aa..00000000 --- a/examples/AdAccountProductAudiencesPostIphoneViewNoPurchase.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -product_audiences = ad_account.product_audiences.create({ - name: 'Test Iphone Product Audience', - product_set_id: '', - inclusions: [{'retention_seconds':86400,'rule':{'and':[{'event':{'eq':'AddToCart'}},{'userAgent':{'i_contains':'iPhone'}}]}}], - exclusions: [{'retention_seconds':172800,'rule':{'event':{'eq':'Purchase'}}}], -}) \ No newline at end of file diff --git a/examples/AdAccountProductAudiencesPostNoPurchase.rb b/examples/AdAccountProductAudiencesPostNoPurchase.rb deleted file mode 100644 index 4beb9816..00000000 --- a/examples/AdAccountProductAudiencesPostNoPurchase.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -product_audiences = ad_account.product_audiences.create({ - name: 'Test Product Audience', - product_set_id: '', - inclusions: [{'retention_seconds':86400,'rule':{'event':{'eq':'AddToCart'}}},{'retention_seconds':72000,'rule':{'event':{'eq':'ViewContent'}}}], - exclusions: [{'retention_seconds':172800,'rule':{'event':{'eq':'Purchase'}}}], -}) \ No newline at end of file diff --git a/examples/AdAccountReachEstimate.rb b/examples/AdAccountReachEstimate.rb deleted file mode 100644 index 909995a3..00000000 --- a/examples/AdAccountReachEstimate.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_account = FacebookAds::AdAccount.get(id) -reachestimates = ad_account.reachestimate({ - fields: { }, - targeting_spec: {'geo_locations':{'countries':['US']},'age_min':20,'age_max':40}, -}) \ No newline at end of file diff --git a/examples/AdCampaignGroupAdsEdge.rb b/examples/AdCampaignGroupAdsEdge.rb deleted file mode 100644 index 2b169fc9..00000000 --- a/examples/AdCampaignGroupAdsEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -campaign = FacebookAds::Campaign.get(id) -adss = campaign.ads({ - fields: { 'name' }, -}) \ No newline at end of file diff --git a/examples/AdCampaignGroupAdsEdgeAdgroupsWithStatusArchived.rb b/examples/AdCampaignGroupAdsEdgeAdgroupsWithStatusArchived.rb deleted file mode 100644 index a8d97682..00000000 --- a/examples/AdCampaignGroupAdsEdgeAdgroupsWithStatusArchived.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -campaign = FacebookAds::Campaign.get(id) -adss = campaign.ads({ - fields: { 'name' }, - effective_status: ['ARCHIVED'], -}) \ No newline at end of file diff --git a/examples/AdCampaignGroupAdsetsEdge.rb b/examples/AdCampaignGroupAdsetsEdge.rb deleted file mode 100644 index 583cd0eb..00000000 --- a/examples/AdCampaignGroupAdsetsEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -campaign = FacebookAds::Campaign.get(id) -adsetss = campaign.adsets({ - fields: { 'name''start_time''end_time''daily_budget''lifetime_budget' }, -}) \ No newline at end of file diff --git a/examples/AdCampaignNode.rb b/examples/AdCampaignNode.rb deleted file mode 100644 index 20651ad9..00000000 --- a/examples/AdCampaignNode.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_set = FacebookAds::AdSet.get(id ,'adset_schedule') \ No newline at end of file diff --git a/examples/AdCampaignPost.rb b/examples/AdCampaignPost.rb deleted file mode 100644 index c68dd5e5..00000000 --- a/examples/AdCampaignPost.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_set = FacebookAds::AdSet.get(id) -ad_set.bid_adjustments = {'user_groups':{'user_bucket':{'event_sources':['',''],'1':0.1,'2':0.2,'3':0.3,'default':{'gender':{'male':0.99,'female':0.12}}}}} -ad_set.save \ No newline at end of file diff --git a/examples/AdCampaignPostAdsetUpdateCpa.rb b/examples/AdCampaignPostAdsetUpdateCpa.rb deleted file mode 100644 index ee8aa73e..00000000 --- a/examples/AdCampaignPostAdsetUpdateCpa.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_set = FacebookAds::AdSet.get(id) -ad_set.billing_event = 'IMPRESSIONS'ad_set.optimization_goal = 'LINK_CLICKS'ad_set.bid_amount = '200'ad_set.targeting = {'geo_locations':{'countries':['US']},'facebook_positions':['feed']} -ad_set.save \ No newline at end of file diff --git a/examples/AdCreativeNode.rb b/examples/AdCreativeNode.rb deleted file mode 100644 index 7bc39af2..00000000 --- a/examples/AdCreativeNode.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_creative = FacebookAds::AdCreative.get(id ,'asset_feed_spec') \ No newline at end of file diff --git a/examples/AdCreativeNodeRead.rb b/examples/AdCreativeNodeRead.rb deleted file mode 100644 index 000ac18b..00000000 --- a/examples/AdCreativeNodeRead.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_creative = FacebookAds::AdCreative.get(id ,'name,object_story_id') \ No newline at end of file diff --git a/examples/AdCreativeNodeReadInstagramPermalinkUrl.rb b/examples/AdCreativeNodeReadInstagramPermalinkUrl.rb deleted file mode 100644 index b7ecd737..00000000 --- a/examples/AdCreativeNodeReadInstagramPermalinkUrl.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_creative = FacebookAds::AdCreative.get(id ,'instagram_permalink_url') \ No newline at end of file diff --git a/examples/AdCreativePreviewsEdge.rb b/examples/AdCreativePreviewsEdge.rb deleted file mode 100644 index 0386e310..00000000 --- a/examples/AdCreativePreviewsEdge.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_creative = FacebookAds::AdCreative.get(id) -previewss = ad_creative.previews({ - fields: { }, - ad_format: 'DESKTOP_FEED_STANDARD', - product_item_ids: [''], -}) \ No newline at end of file diff --git a/examples/AdCreativePreviewsEdgePreview.rb b/examples/AdCreativePreviewsEdgePreview.rb deleted file mode 100644 index 62d6d82f..00000000 --- a/examples/AdCreativePreviewsEdgePreview.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_creative = FacebookAds::AdCreative.get(id) -previewss = ad_creative.previews({ - fields: { }, - ad_format: 'DESKTOP_FEED_STANDARD', -}) \ No newline at end of file diff --git a/examples/AdCreativePreviewsEdgePreviewDynamicAds.rb b/examples/AdCreativePreviewsEdgePreviewDynamicAds.rb deleted file mode 100644 index 0386e310..00000000 --- a/examples/AdCreativePreviewsEdgePreviewDynamicAds.rb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_creative = FacebookAds::AdCreative.get(id) -previewss = ad_creative.previews({ - fields: { }, - ad_format: 'DESKTOP_FEED_STANDARD', - product_item_ids: [''], -}) \ No newline at end of file diff --git a/examples/AdCreativePreviewsEdgePreviewDynamicAdsWithCustomizations.rb b/examples/AdCreativePreviewsEdgePreviewDynamicAdsWithCustomizations.rb deleted file mode 100644 index eb16e7ce..00000000 --- a/examples/AdCreativePreviewsEdgePreviewDynamicAdsWithCustomizations.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_creative = FacebookAds::AdCreative.get(id) -previewss = ad_creative.previews({ - fields: { }, - ad_format: 'DESKTOP_FEED_STANDARD', - product_item_ids: [''], - dynamic_customization: {'language':'fr_XX','country':'FR'}, -}) \ No newline at end of file diff --git a/examples/AdgroupLeadsEdgeAdgroupLeads.rb b/examples/AdgroupLeadsEdgeAdgroupLeads.rb deleted file mode 100644 index 0069b2b8..00000000 --- a/examples/AdgroupLeadsEdgeAdgroupLeads.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad = FacebookAds::Ad.get(id) -leadss = ad.leads({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/AdgroupLeadsEdgeAdgroupLeadsDPA.rb b/examples/AdgroupLeadsEdgeAdgroupLeadsDPA.rb deleted file mode 100644 index 66dd44ac..00000000 --- a/examples/AdgroupLeadsEdgeAdgroupLeadsDPA.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad = FacebookAds::Ad.get(id) -leadss = ad.leads({ - fields: { 'field_data''retailer_item_id' }, -}) \ No newline at end of file diff --git a/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.rb b/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.rb deleted file mode 100644 index 2218ea14..00000000 --- a/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad = FacebookAds::Ad.get(id) -leadss = ad.leads({ - fields: { }, - filtering: [{'field':'time_created','operator':'GREATER_THAN','value':1717544918}], -}) \ No newline at end of file diff --git a/examples/AdgroupPost.rb b/examples/AdgroupPost.rb deleted file mode 100644 index 23d86627..00000000 --- a/examples/AdgroupPost.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad = FacebookAds::Ad.get(id) -ad.name = 'My New Ad' -ad.save \ No newline at end of file diff --git a/examples/AdgroupPostUpdateStatus.rb b/examples/AdgroupPostUpdateStatus.rb deleted file mode 100644 index cb7399ce..00000000 --- a/examples/AdgroupPostUpdateStatus.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad = FacebookAds::Ad.get(id) -ad.adgroup_status = 'PAUSED' -ad.save \ No newline at end of file diff --git a/examples/AdsInsightsEdgeAdCampaignInsights.rb b/examples/AdsInsightsEdgeAdCampaignInsights.rb deleted file mode 100644 index 40397752..00000000 --- a/examples/AdsInsightsEdgeAdCampaignInsights.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_set = FacebookAds::AdSet.get(id) -insightss = ad_set.insights({ - fields: { 'impressions' }, - breakdown: 'publisher_platform', -}) \ No newline at end of file diff --git a/examples/AdsPixelEventsPost.rb b/examples/AdsPixelEventsPost.rb deleted file mode 100644 index 1618e8f7..00000000 --- a/examples/AdsPixelEventsPost.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ads_pixel = FacebookAds::AdsPixel.get(id) -events = ads_pixel.events.create({ - data: [{'event_name':'PageView','event_time':1718149023,'user_data':{'fbc':'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp':'fb.1.1558571054389.1098115397','em':'309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'}}], -}) \ No newline at end of file diff --git a/examples/AdsPixelEventsPostCustom.rb b/examples/AdsPixelEventsPostCustom.rb deleted file mode 100644 index f721667a..00000000 --- a/examples/AdsPixelEventsPostCustom.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -pixel_id = '' - -FacebookAds.configure do |config| - config.access_token = access_token -end - -user_data = FacebookAds::ServerSide::UserData.new( - emails: ['joe@eg.com'], - phones: ['12345678901', '14251234567'], - # It is recommended to send Client IP and User Agent for Conversions API Events. - client_ip_address: request.remote_ip, - client_user_agent: request.user_agent, - fbc: 'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890', - fbp: 'fb.1.1558571054389.1098115397' -) - -content = FacebookAds::ServerSide::Content.new( - product_id: 'product123', - quantity: 1, - delivery_category: 'home_delivery' -) - -custom_data = FacebookAds::ServerSide::CustomData.new( - contents: [content], - currency: 'usd', - value: 123.45 -) - -event = FacebookAds::ServerSide::Event.new( - event_name: 'Purchase', - event_time: Time.now.to_i, - user_data: user_data, - custom_data: custom_data, - event_source_url: 'http://jaspers-market.com/product/123', - action_source: 'website' -) - -request = FacebookAds::ServerSide::EventRequest.new( - pixel_id: pixel_id, - events: [event] -) - -print request.execute \ No newline at end of file diff --git a/examples/AdsPixelSharedAccountsEdge.rb b/examples/AdsPixelSharedAccountsEdge.rb deleted file mode 100644 index 427bc8e0..00000000 --- a/examples/AdsPixelSharedAccountsEdge.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ads_pixel = FacebookAds::AdsPixel.get(id) -shared_accountss = ads_pixel.shared_accounts({ - fields: { }, - business: '', -}) \ No newline at end of file diff --git a/examples/AdsPixelSharedAccountsPost.rb b/examples/AdsPixelSharedAccountsPost.rb deleted file mode 100644 index f819cf9d..00000000 --- a/examples/AdsPixelSharedAccountsPost.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ads_pixel = FacebookAds::AdsPixel.get(id) -shared_accounts = ads_pixel.shared_accounts.create({ - account_id: '', - business: '', -}) \ No newline at end of file diff --git a/examples/AdsPixelSharedAgenciesEdge.rb b/examples/AdsPixelSharedAgenciesEdge.rb deleted file mode 100644 index c578f9ec..00000000 --- a/examples/AdsPixelSharedAgenciesEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ads_pixel = FacebookAds::AdsPixel.get(id) -shared_agenciess = ads_pixel.shared_agencies({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/CustomAudienceDelete.rb b/examples/CustomAudienceDelete.rb deleted file mode 100644 index f67f3a59..00000000 --- a/examples/CustomAudienceDelete.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -custom_audience = FacebookAds::CustomAudience.get(id) -custom_audience.destroy({ - -}) \ No newline at end of file diff --git a/examples/CustomAudienceNode.rb b/examples/CustomAudienceNode.rb deleted file mode 100644 index 763908b2..00000000 --- a/examples/CustomAudienceNode.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -custom_audience = FacebookAds::CustomAudience.get(id ,'') \ No newline at end of file diff --git a/examples/CustomAudienceNodeReadRule.rb b/examples/CustomAudienceNodeReadRule.rb deleted file mode 100644 index de38c1d0..00000000 --- a/examples/CustomAudienceNodeReadRule.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -custom_audience = FacebookAds::CustomAudience.get(id ,'name,rule') \ No newline at end of file diff --git a/examples/CustomAudiencePost.rb b/examples/CustomAudiencePost.rb deleted file mode 100644 index bf79d52d..00000000 --- a/examples/CustomAudiencePost.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -custom_audience = FacebookAds::CustomAudience.get(id) -custom_audience.name = 'Updated Name for CA' -custom_audience.save \ No newline at end of file diff --git a/examples/CustomAudienceUsersPost.rb b/examples/CustomAudienceUsersPost.rb deleted file mode 100644 index 0dd2efe5..00000000 --- a/examples/CustomAudienceUsersPost.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -custom_audience = FacebookAds::CustomAudience.get(id) -users = custom_audience.users.create({ - payload: {'schema':['EMAIL','LOOKALIKE_VALUE'],'data':[['9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254',44.5],['8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee',140],['4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a',0],['98df8d46f118f8bef552b0ec0a3d729466a912577830212a844b73960777ac56',0.9]]}, -}) \ No newline at end of file diff --git a/examples/CustomAudienceUsersPostCrossPlatform.rb b/examples/CustomAudienceUsersPostCrossPlatform.rb deleted file mode 100644 index c42944ea..00000000 --- a/examples/CustomAudienceUsersPostCrossPlatform.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -custom_audience = FacebookAds::CustomAudience.get(id) -users = custom_audience.users.create({ - payload: {'schema':['EMAIL','MADID','APPUID','LOOKALIKE_VALUE'],'app_ids':[''],'data':[['b36a83701f1c3191e19722d6f90274bc1b5501fe69ebf33313e440fe4b0fe210','6032d997-3ab0-4de0-aa16-8af0e5b482fb','1234567890','0.9'],['2b3b2b9ce842ab8b6a6c614cb1f9604bb8a0d502d1af49c526b72b10894e95b5','B67385F8-9A82-4670-8C0A-6F9EA7513F5F','','0'],['898628e28890f937bdf009391def42879c401a4bcf1b5fd24e738d9f5da8cbbb','','9876543210','0.4']]}, -}) \ No newline at end of file diff --git a/examples/OfflineConversionsCreateOfflineSet.rb b/examples/OfflineConversionsCreateOfflineSet.rb deleted file mode 100644 index 1e440cde..00000000 --- a/examples/OfflineConversionsCreateOfflineSet.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -business = FacebookAds::Business.get(id) -offline_conversion_data_sets = business.offline_conversion_data_sets.create({ - name: 'offline_event_set', - description: 'conversion data used for superbowl campaign', -}) \ No newline at end of file diff --git a/examples/PageFeedEdge.rb b/examples/PageFeedEdge.rb deleted file mode 100644 index ac13c261..00000000 --- a/examples/PageFeedEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -feeds = page.feed({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/PageFeedPost.rb b/examples/PageFeedPost.rb deleted file mode 100644 index c8620d8c..00000000 --- a/examples/PageFeedPost.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -feed = page.feed.create({ - message: 'This is a test value', -}) \ No newline at end of file diff --git a/examples/PageFeedPostFeedImageDeepLink.rb b/examples/PageFeedPostFeedImageDeepLink.rb deleted file mode 100644 index 16b6b8c5..00000000 --- a/examples/PageFeedPostFeedImageDeepLink.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -feed = page.feed.create({ - message: 'This is a test message', - call_to_action: {'type':'BUY_NOW','value':{'link':'','app_link':''}}, -}) \ No newline at end of file diff --git a/examples/PageNode.rb b/examples/PageNode.rb deleted file mode 100644 index f51ad3f1..00000000 --- a/examples/PageNode.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -locationss = page.locations({ - fields: { 'location{latitude''longitude}''is_permanently_closed' }, - limit: '30000', -}) \ No newline at end of file diff --git a/examples/PageNodePageSearch.rb b/examples/PageNodePageSearch.rb deleted file mode 100644 index 56c42a58..00000000 --- a/examples/PageNodePageSearch.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id ,'') \ No newline at end of file diff --git a/examples/PagePageWhatsAppNumberVerificationPost.rb b/examples/PagePageWhatsAppNumberVerificationPost.rb deleted file mode 100644 index 111e0bac..00000000 --- a/examples/PagePageWhatsAppNumberVerificationPost.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -page_whatsapp_number_verification = page.page_whatsapp_number_verification.create({ - whatsapp_number: '123456789', - verification_code: '12345', -}) \ No newline at end of file diff --git a/examples/PagePhotosEdge.rb b/examples/PagePhotosEdge.rb deleted file mode 100644 index f6431f69..00000000 --- a/examples/PagePhotosEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -photoss = page.photos({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/PagePhotosPost.rb b/examples/PagePhotosPost.rb deleted file mode 100644 index 5f8bd905..00000000 --- a/examples/PagePhotosPost.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -photos = page.photos.create({ - url: 'https://www.facebook.com/images/fb_icon_325x325.png', - published: 'false', -}) \ No newline at end of file diff --git a/examples/PagePictureEdge.rb b/examples/PagePictureEdge.rb deleted file mode 100644 index 552d6e9e..00000000 --- a/examples/PagePictureEdge.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -pictures = page.picture({ - fields: { }, - redirect: '0', -}) \ No newline at end of file diff --git a/examples/PagePostCommentsPost.rb b/examples/PagePostCommentsPost.rb deleted file mode 100644 index b6cab3d8..00000000 --- a/examples/PagePostCommentsPost.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page_post = FacebookAds::PagePost.get(id) -comments = page_post.comments.create({ - message: 'This is a test value', -}) \ No newline at end of file diff --git a/examples/PagePostDelete.rb b/examples/PagePostDelete.rb deleted file mode 100644 index b8e3e066..00000000 --- a/examples/PagePostDelete.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page_post = FacebookAds::PagePost.get(id) -page_post.destroy({ - -}) \ No newline at end of file diff --git a/examples/PagePostNode.rb b/examples/PagePostNode.rb deleted file mode 100644 index 480028fd..00000000 --- a/examples/PagePostNode.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page_post = FacebookAds::PagePost.get(id ,'') \ No newline at end of file diff --git a/examples/PagePostPost.rb b/examples/PagePostPost.rb deleted file mode 100644 index 031d5ceb..00000000 --- a/examples/PagePostPost.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page_post = FacebookAds::PagePost.get(id) -page_post.message = 'This is a test value' -page_post.save \ No newline at end of file diff --git a/examples/PagePostsEdge.rb b/examples/PagePostsEdge.rb deleted file mode 100644 index 845f567d..00000000 --- a/examples/PagePostsEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -postss = page.posts({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/PagePostsEdgePagePostCreateCarousel.rb b/examples/PagePostsEdgePagePostCreateCarousel.rb deleted file mode 100644 index 28afb06d..00000000 --- a/examples/PagePostsEdgePagePostCreateCarousel.rb +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -postss = page.posts({ - fields: { }, - message: 'Browse our latest products', - published: '0', - child_attachments: [{'link':'','name':'Product 1','description':'$4.99','image_hash':''},{'link':'','name':'Product 2','description':'$4.99','image_hash':''},{'link':'','name':'Product 3','description':'$4.99','image_hash':''},{'link':'','name':'Product 4','description':'$4.99','image_hash':''}], - caption: 'WWW.EXAMPLE.COM', - link: 'http://www.example.com/products', -}) \ No newline at end of file diff --git a/examples/PageRolesEdge.rb b/examples/PageRolesEdge.rb deleted file mode 100644 index 0f13d16e..00000000 --- a/examples/PageRolesEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -roless = page.roles({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/PageSubscribedAppsPost.rb b/examples/PageSubscribedAppsPost.rb deleted file mode 100644 index 5fc012c6..00000000 --- a/examples/PageSubscribedAppsPost.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -page = FacebookAds::Page.get(id) -subscribed_apps = page.subscribed_apps.create({ - subscribed_fields: 'leadgen', -}) \ No newline at end of file diff --git a/examples/ProductCatalogEventStatsEdge.rb b/examples/ProductCatalogEventStatsEdge.rb deleted file mode 100644 index b315b9b5..00000000 --- a/examples/ProductCatalogEventStatsEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -product_catalog = FacebookAds::ProductCatalog.get(id) -event_statss = product_catalog.event_stats({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/ProductCatalogHotelsPost.rb b/examples/ProductCatalogHotelsPost.rb deleted file mode 100644 index 982ec382..00000000 --- a/examples/ProductCatalogHotelsPost.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -product_catalog = FacebookAds::ProductCatalog.get(id) -hotels = product_catalog.hotels.create({ - hotel_id: 'h_1', - name: 'Sample Hotel', - description: 'hotel description', - brand: 'hotel brand', - url: 'http://www.example.com/samplehotel', - images: [{'image_url':'https://www.example.com/pic1.jpg','tags':['front view','balcony']},{'image_url':'http://www.example.com/pic2.jpg','tags':['lobby view']}], - address: {'street_address':'1 Hacker Way','city':'Menlo Park','region':'California','country':'United States','postal_code':'94025','neighborhoods':['Palo Alto','Menlo Park'],'latitude':37.484116,'longitude':-122.148244}, - guest_ratings: [{'score':7.8,'max_score':10,'rating_system':'sample_rating','number_of_raters':780}], - star_rating: '4', - phone: '+351234123456', -}) \ No newline at end of file diff --git a/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.rb b/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.rb deleted file mode 100644 index 5d63593a..00000000 --- a/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -product_catalog = FacebookAds::ProductCatalog.get(id) - -product_catalog.save \ No newline at end of file diff --git a/examples/ProductCatalogProductFeedsPostProductFeed.rb b/examples/ProductCatalogProductFeedsPostProductFeed.rb deleted file mode 100644 index 72179c66..00000000 --- a/examples/ProductCatalogProductFeedsPostProductFeed.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -product_catalog = FacebookAds::ProductCatalog.get(id) -product_feeds = product_catalog.product_feeds.create({ - name: 'Test Feed', - schedule: {'interval':'DAILY','url':'http://www.example.com/sample_feed.tsv','hour':'22'}, -}) \ No newline at end of file diff --git a/examples/ProductCatalogProductSetsPostHotelSet.rb b/examples/ProductCatalogProductSetsPostHotelSet.rb deleted file mode 100644 index 8cdc2231..00000000 --- a/examples/ProductCatalogProductSetsPostHotelSet.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -product_catalog = FacebookAds::ProductCatalog.get(id) -product_sets = product_catalog.product_sets.create({ - name: 'Test Hotel Set', - filter: {'brand':{'i_contains':'sample brand'}}, -}) \ No newline at end of file diff --git a/examples/ProductCatalogProductSetsPostProductSet.rb b/examples/ProductCatalogProductSetsPostProductSet.rb deleted file mode 100644 index 60289d52..00000000 --- a/examples/ProductCatalogProductSetsPostProductSet.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -product_catalog = FacebookAds::ProductCatalog.get(id) -product_sets = product_catalog.product_sets.create({ - name: 'Test Set', - filter: {'product_type':{'i_contains':'shirt'}}, -}) \ No newline at end of file diff --git a/examples/UserAccountsEdge.rb b/examples/UserAccountsEdge.rb deleted file mode 100644 index 65b67eee..00000000 --- a/examples/UserAccountsEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -user = FacebookAds::User.get(id) -accountss = user.accounts({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/UserAdAccountsEdge.rb b/examples/UserAdAccountsEdge.rb deleted file mode 100644 index eeba3949..00000000 --- a/examples/UserAdAccountsEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -user = FacebookAds::User.get(id) -adaccountss = user.adaccounts({ - fields: { }, -}) \ No newline at end of file diff --git a/examples/UserLeadGenInfoNode.rb b/examples/UserLeadGenInfoNode.rb deleted file mode 100644 index f0f88b3d..00000000 --- a/examples/UserLeadGenInfoNode.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -lead = FacebookAds::Lead.get(id ,'') \ No newline at end of file diff --git a/examples/UserNode.rb b/examples/UserNode.rb deleted file mode 100644 index f396dc66..00000000 --- a/examples/UserNode.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -user = FacebookAds::User.get(id ,'') \ No newline at end of file diff --git a/examples/VideoThumbnailsEdge.rb b/examples/VideoThumbnailsEdge.rb deleted file mode 100644 index 8b0123f9..00000000 --- a/examples/VideoThumbnailsEdge.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -# copy, modify, and distribute this software in source code or binary form for use -# in connection with the web services and APIs provided by Facebook. -# -# As with any software that integrates with the Facebook platform, your use of -# this software is subject to the Facebook Platform Policy -# [http://developers.facebook.com/policy/]. This copyright notice shall be -# included in all copies or substantial portions of the software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'facebook_ads' - -access_token = '' -app_secret = '' -app_id = '' -id = '' - -FacebookAds.configure do |config| - config.access_token = access_token - config.app_secret = app_secret -end - -ad_video = FacebookAds::AdVideo.get(id) -thumbnailss = ad_video.thumbnails({ - fields: { }, -}) \ No newline at end of file diff --git a/lib/facebook_ads/ad_objects/ad.rb b/lib/facebook_ads/ad_objects/ad.rb index d3b053d7..29b01d4a 100644 --- a/lib/facebook_ads/ad_objects/ad.rb +++ b/lib/facebook_ads/ad_objects/ad.rb @@ -120,6 +120,7 @@ class Ad < AdObject field :issues_info, { list: 'AdgroupIssuesInfo' } field :last_updated_by_app_id, 'string' field :name, 'string' + field :placement, 'Placement' field :preview_shareable_link, 'string' field :priority, 'int' field :recommendations, { list: 'AdRecommendation' } diff --git a/lib/facebook_ads/ad_objects/ad_account.rb b/lib/facebook_ads/ad_objects/ad_account.rb index d965874e..09809cbb 100644 --- a/lib/facebook_ads/ad_objects/ad_account.rb +++ b/lib/facebook_ads/ad_objects/ad_account.rb @@ -142,6 +142,7 @@ class AdAccount < AdObject "LOOKALIKE", "MANAGED", "MEASUREMENT", + "MESSENGER_SUBSCRIBER_LIST", "OFFLINE_CONVERSION", "PARTNER", "PRIMARY", @@ -511,6 +512,8 @@ class AdAccount < AdObject api.has_param :lifetime_min_spend_target, 'int' api.has_param :lifetime_spend_cap, 'int' api.has_param :line_number, 'int' + api.has_param :max_budget_spend_percentage, 'int' + api.has_param :min_budget_spend_percentage, 'int' api.has_param :multi_optimization_goal_weight, { enum: -> { AdSet::MULTI_OPTIMIZATION_GOAL_WEIGHT }} api.has_param :name, 'string' api.has_param :optimization_goal, { enum: -> { AdSet::OPTIMIZATION_GOAL }} @@ -597,11 +600,10 @@ class AdAccount < AdObject api.has_param :formatting, { enum: -> { AdVideo::FORMATTING }} api.has_param :fov, 'int' api.has_param :front_z_rotation, 'double' - api.has_param :fun_fact_prompt_id, 'int' + api.has_param :fun_fact_prompt_id, 'string' api.has_param :fun_fact_toastee_id, 'int' api.has_param :guide, { list: { list: 'int' } } api.has_param :guide_enabled, 'bool' - api.has_param :holiday_card, 'string' api.has_param :initial_heading, 'int' api.has_param :initial_pitch, 'int' api.has_param :instant_game_entry_point_data, 'string' @@ -610,7 +612,6 @@ class AdAccount < AdObject api.has_param :is_voice_clip, 'bool' api.has_param :location_source_id, 'string' api.has_param :name, 'string' - api.has_param :offer_like_post_id, 'int' api.has_param :og_action_type_id, 'string' api.has_param :og_icon_id, 'string' api.has_param :og_object_id, 'string' @@ -817,11 +818,13 @@ class AdAccount < AdObject api.has_param :event_source_group, 'string' api.has_param :event_sources, { list: 'hash' } api.has_param :exclusions, { list: 'object' } + api.has_param :facebook_page_id, 'string' api.has_param :inclusions, { list: 'object' } api.has_param :is_snapshot, 'bool' api.has_param :is_value_based, 'bool' api.has_param :list_of_accounts, { list: 'int' } api.has_param :lookalike_spec, 'string' + api.has_param :marketing_message_channels, 'object' api.has_param :name, 'string' api.has_param :opt_out_link, 'string' api.has_param :origin_audience_id, 'string' @@ -835,7 +838,9 @@ class AdAccount < AdObject api.has_param :rev_share_policy_id, 'int' api.has_param :rule, 'string' api.has_param :rule_aggregation, 'string' + api.has_param :subscription_info, { list: { enum: -> { CustomAudience::SUBSCRIPTION_INFO }} } api.has_param :subtype, { enum: -> { CustomAudience::SUBTYPE }} + api.has_param :use_for_products, { list: { enum: -> { CustomAudience::USE_FOR_PRODUCTS }} } api.has_param :use_in_campaigns, 'bool' api.has_param :video_group_ids, { list: 'string' } api.has_param :whats_app_business_phone_number_id, 'string' @@ -1218,12 +1223,19 @@ class AdAccount < AdObject end end - has_edge :value_adjustment_rule_collections do |edge| + has_edge :value_adjustment_rules do |edge| + edge.get 'AdsValueAdjustmentRule' + end + + has_edge :value_rule_set do |edge| edge.get 'AdsValueAdjustmentRuleCollection' end - has_edge :value_adjustment_rules do |edge| - edge.get 'AdsValueAdjustmentRule' + has_edge :video_ads do |edge| + edge.get 'AdVideo' do |api| + api.has_param :since, 'datetime' + api.has_param :until, 'datetime' + end end end diff --git a/lib/facebook_ads/ad_objects/ad_account_ad_rules_history.rb b/lib/facebook_ads/ad_objects/ad_account_ad_rules_history.rb index 3465a682..c101202d 100644 --- a/lib/facebook_ads/ad_objects/ad_account_ad_rules_history.rb +++ b/lib/facebook_ads/ad_objects/ad_account_ad_rules_history.rb @@ -18,13 +18,17 @@ class AdAccountAdRulesHistory < AdObject "BUDGET_NOT_REDISTRIBUTED", "CHANGED_BID", "CHANGED_BUDGET", + "CONSOLIDATE_ASC_FRAGMENTATION", + "CONVERT_ASC_CP_SINGLE_INSTANCE", "EMAIL", "ENABLE_ADVANTAGE_CAMPAIGN_BUDGET", "ENABLE_ADVANTAGE_PLUS_CREATIVE", "ENABLE_ADVANTAGE_PLUS_PLACEMENTS", "ENABLE_AUTOFLOW", "ENABLE_GEN_UNCROP", + "ENABLE_LANDING_PAGE_VIEWS", "ENABLE_MUSIC", + "ENABLE_REELS_PLACEMENTS", "ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION", "ENABLE_SHOPS_ADS", "ENDPOINT_PINGED", diff --git a/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb b/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb index 4ab1455c..ee08d463 100644 --- a/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb +++ b/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb @@ -31,6 +31,7 @@ class AdAccountAdVolume < AdObject "ADVANTAGE_DETAILED_TARGETING", "ADVANTAGE_LOOKALIKE_AUDIENCE", "ADVANTAGE_LOOKALIKE_DUPLICATION", + "ADVANTAGE_PLUS_APP_CAMPAIGN", "ADVANTAGE_PLUS_APP_CAMPAIGN_PRECREATE", "ADVANTAGE_PLUS_AUDIENCE", "ADVANTAGE_PLUS_AUDIENCE_DUPLICATION", @@ -43,8 +44,10 @@ class AdAccountAdVolume < AdObject "ADVANTAGE_PLUS_CREATIVE_SE", "ADVANTAGE_PLUS_PLACEMENTS_DUPLICATION", "ADVANTAGE_PLUS_PLACEMENTS_FRICTION", + "ADVANTAGE_PLUS_PLACEMENTS_V2_DUPLICATION", "ADVANTAGE_SHOPPING_CAMPAIGN", "ADVANTAGE_SHOPPING_CAMPAIGN_FRAGMENTATION", + "AD_LIFT_RECALL_GOAL", "AD_LIFT_RECALL_GOAL_PRECREATE", "AD_LIFT_RECALL_OPTIMIZATION_GOAL", "AD_OBJECTIVE", @@ -65,6 +68,7 @@ class AdAccountAdVolume < AdObject "AUCTION_OVERLAP_CONSOLIDATION", "AUDIENCE_EXPANSION", "AUDIENCE_EXPANSION_GEORADIUS", + "AUDIENCE_EXPANSION_LOOKALIKE", "AUDIENCE_EXPANSION_RETARGETING", "AUDIENCE_LEARNING_LIMITED", "AUTOFLOW_OPT_IN", @@ -76,6 +80,7 @@ class AdAccountAdVolume < AdObject "BACKGROUND_GENERATION", "BLENDED_ADS", "BLENDED_ADS_DUPLICATION", + "BLENDED_ADS_FOR_SHOPS_ADS_DUPLICATION", "BROAD_TARGETING", "BUDGET_LIMITED", "CAPI", @@ -111,6 +116,7 @@ class AdAccountAdVolume < AdObject "CTX_BUDGET_OPTIMIZATION", "CTX_CREATION_PACKAGE", "CTX_CTA_UPGRADE_IN_DUPLICATION", + "CTX_CTMPO_UPGRADE", "CTX_GUIDANCE", "CTX_PRECREATE", "DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS", @@ -122,6 +128,7 @@ class AdAccountAdVolume < AdObject "DELIVERY_WARNING", "DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET", "ECOSYSTEM_BID_REDUCE_L1_CARDINALITY", + "ENGAGED_VIEW_CONVERSIONS_CREATION", "EVC_APP_DUPLICATION_UPGRADE", "EVC_WEB_DUPLICATION_UPGRADE", "FRAGMENTATION", @@ -134,34 +141,44 @@ class AdAccountAdVolume < AdObject "HIGH_COST", "HISTORICAL_BENCHMARK", "IG_MULTI_ADS", + "LANDING_PAGE_VIEW", "LANDING_PAGE_VIEW_OPTIMIZATION_GOAL", "LANDING_PAGE_VIEW_PRECREATE", "LEAD_ADS_GUIDANCE", "LEARNING_LIMITED", "LEARNING_PAUSE_FRICTION", "LEARNING_PHASE_BUDGET_EDITS", + "LOW_BUDGET_UTILIZATION", "LOW_OUTCOME", "MERLIN_GUIDANCE", + "MESSAGING_EVENTS", "MESSAGING_EVENTS_PRECREATE", + "MESSAGING_PARTNERS", "MESSAGING_PARTNERS_PRECREATE", "META_VERIFIED_ADS_PERFORMANCE_GUIDANCE", + "MISSING_OR_INVALID_PARAMETERS", "MIXED_FORMATS", "MIXED_PA_COMBINE_ADSETS", "MMT_CAROUSEL_TO_VIDEO", "MOBILE_FIRST_CREATIVE", "MOBILE_FIRST_VIDEO", "MR_AEMV2SUB_KCONSOLIDATION", + "MULTI_ADVERTISER_ADS", "MULTI_TEXT", "MUSIC", "NOT_APPLICABLE", "NO_DELIVERY_STATUS", "OFFSITE_CONVERSION", "OPTIMAL_BAU", + "OUTCOME_FORECASTER_SHADOW_LOGGING", "PAYMENT_METHOD", "PERFORMANT_CREATIVE_REELS_OPT_IN", "PFR_L1_INLINE_MMT", + "PIXEL_OPTIMIZATION_AAM", "PIXEL_OPTIMIZATION_AAM_PRECREATE", + "PIXEL_OPTIMIZATION_HIE", "PIXEL_OPTIMIZATION_HIE_PRECREATE", + "PIXEL_SETUP", "PIXEL_SETUP_PRECREATE", "PIXEL_UPSELL", "PLACEMENTS_LIQUIDITY_AUTOMATIC_GUIDANCE", @@ -183,12 +200,14 @@ class AdAccountAdVolume < AdObject "SALES_CONVERSION", "SCALE_GOOD_CAMPAIGN", "SCALE_GOOD_CAMPAIGN_DUPLICATION", + "SCALE_GOOD_CAMPAIGN_SMB", "SCALE_GOOD_CTX_CAMPAIGN", "SEMANTIC_BASED_AUDIENCE_DUPLICATION", "SEMANTIC_BASED_AUDIENCE_EXPANSION", "SETUP_PIXEL", "SHOPS_ADS", "SHOPS_ADS_DUPLICATION", + "SHOPS_ADS_TRAFFIC_CAP_SETTINGS", "SHOP_ADS_V2", "SIGNALS_GROWTH_CAPI", "SIGNALS_GROWTH_CAPI_PRECREATE", @@ -212,9 +231,11 @@ class AdAccountAdVolume < AdObject "UNECONOMICAL_ADS_THROTTLING", "UNIFIED_INBOX", "UNUSED_BUDGET", + "VALUE_DIAGNOSTICS_GUIDANCE", "VIDEO_LENGTH", "VIDEO_VIEWS_UPSELL", "VIDEO_VIEWS_UPSELL_PRECREATE", + "WA_MESSAGING_PARTNERS", "WA_MESSAGING_PARTNERS_PRECREATE", "WEB_ENGAGED_VIEW_CONVERSIONS", "ZERO_CONVERSION", diff --git a/lib/facebook_ads/ad_objects/external_event_source_da_stats_result.rb b/lib/facebook_ads/ad_objects/ad_account_live_video_advertiser.rb similarity index 64% rename from lib/facebook_ads/ad_objects/external_event_source_da_stats_result.rb rename to lib/facebook_ads/ad_objects/ad_account_live_video_advertiser.rb index a0c0c5fa..dd2ee041 100644 --- a/lib/facebook_ads/ad_objects/external_event_source_da_stats_result.rb +++ b/lib/facebook_ads/ad_objects/ad_account_live_video_advertiser.rb @@ -13,14 +13,11 @@ module FacebookAds # on github and we'll fix in our codegen framework. We'll not be able to accept # pull request for this class. - class ExternalEventSourceDaStatsResult < AdObject + class AdAccountLiveVideoAdvertiser < AdObject - field :count_content_ids, 'int' - field :count_content_ids_match_any_catalog, 'int' - field :count_fires, 'int' - field :count_fires_match_any_catalog, 'int' - field :date, 'string' - field :percentage_missed_users, 'double' + field :is_lva_toggle_on, 'bool' + field :lva_default_budget, 'int' + field :should_show_lva_toggle, 'bool' has_no_id has_no_get has_no_post diff --git a/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb b/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb index 9a02b23f..1600f2b1 100644 --- a/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb +++ b/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb @@ -46,6 +46,7 @@ class AdAccountTargetingUnified < AdObject REGULATED_CATEGORIES = [ "CREDIT", "EMPLOYMENT", + "FINANCIAL_PRODUCTS_SERVICES", "HOUSING", "ISSUES_ELECTIONS_POLITICS", "NONE", diff --git a/lib/facebook_ads/ad_objects/ad_activity.rb b/lib/facebook_ads/ad_objects/ad_activity.rb index 5a62048f..ab9aea64 100644 --- a/lib/facebook_ads/ad_objects/ad_activity.rb +++ b/lib/facebook_ads/ad_objects/ad_activity.rb @@ -27,10 +27,12 @@ class AdActivity < AdObject "ad_account_remove_user_from_role", "ad_account_reset_spend_limit", "ad_account_set_business_information", + "ad_account_update_audience_type_url_parameter", "ad_account_update_spend_limit", "ad_account_update_status", "ad_review_approved", "ad_review_declined", + "adaccount_update_audience_segment", "add_funding_source", "add_images", "billing_event", @@ -86,6 +88,7 @@ class AdActivity < AdObject "update_campaign_budget_optimization_toggling_status", "update_campaign_budget_scheduling_state", "update_campaign_conversion_goal", + "update_campaign_delivery_destination", "update_campaign_delivery_type", "update_campaign_group_ad_scheduling", "update_campaign_group_budget_scheduling_state", diff --git a/lib/facebook_ads/ad_objects/ad_creative.rb b/lib/facebook_ads/ad_objects/ad_creative.rb index 4d780e14..1f25722d 100644 --- a/lib/facebook_ads/ad_objects/ad_creative.rb +++ b/lib/facebook_ads/ad_objects/ad_creative.rb @@ -203,6 +203,7 @@ class AdCreative < AdObject field :link_destination_display_url, 'string' field :link_og_id, 'string' field :link_url, 'string' + field :messenger_sponsored_message, 'string' field :name, 'string' field :object_id, 'string' field :object_store_url, 'string' diff --git a/lib/facebook_ads/ad_objects/ad_creative_branded_content_ads.rb b/lib/facebook_ads/ad_objects/ad_creative_branded_content_ads.rb index dc5748f1..92f84abb 100644 --- a/lib/facebook_ads/ad_objects/ad_creative_branded_content_ads.rb +++ b/lib/facebook_ads/ad_objects/ad_creative_branded_content_ads.rb @@ -21,6 +21,8 @@ class AdCreativeBrandedContentAds < AdObject field :facebook_boost_post_access_token, 'string' field :instagram_boost_post_access_token, 'string' field :is_mca_internal, 'bool' + field :parent_source_facebook_post_id, 'string' + field :parent_source_instagram_media_id, 'string' field :partners, { list: 'AdCreativeBrandedContentAdsPartners' } field :product_set_partner_selection_status, 'string' field :promoted_page_id, 'string' diff --git a/lib/facebook_ads/ad_objects/ad_creative_branded_content_ads_partners.rb b/lib/facebook_ads/ad_objects/ad_creative_branded_content_ads_partners.rb index 829260db..85ac70e1 100644 --- a/lib/facebook_ads/ad_objects/ad_creative_branded_content_ads_partners.rb +++ b/lib/facebook_ads/ad_objects/ad_creative_branded_content_ads_partners.rb @@ -16,6 +16,7 @@ module FacebookAds class AdCreativeBrandedContentAdsPartners < AdObject field :fb_page_id, 'string' + field :has_create_ads_access, 'bool' field :identity_type, 'string' field :ig_asset_id, 'string' field :ig_user_id, 'string' diff --git a/lib/facebook_ads/ad_objects/ad_creative_features_spec.rb b/lib/facebook_ads/ad_objects/ad_creative_features_spec.rb index 6e6daa4a..fc0913fc 100644 --- a/lib/facebook_ads/ad_objects/ad_creative_features_spec.rb +++ b/lib/facebook_ads/ad_objects/ad_creative_features_spec.rb @@ -27,9 +27,17 @@ class AdCreativeFeaturesSpec < AdObject field :cv_transformation, 'AdCreativeFeatureDetails' field :description_automation, 'AdCreativeFeatureDetails' field :dha_optimization, 'AdCreativeFeatureDetails' + field :dynamic_partner_content, 'AdCreativeFeatureDetails' field :enhance_cta, 'AdCreativeFeatureDetails' + field :fb_feed_tag, 'AdCreativeFeatureDetails' + field :fb_reels_tag, 'AdCreativeFeatureDetails' + field :fb_story_tag, 'AdCreativeFeatureDetails' field :feed_caption_optimization, 'AdCreativeFeatureDetails' + field :ig_feed_tag, 'AdCreativeFeatureDetails' field :ig_glados_feed, 'AdCreativeFeatureDetails' + field :ig_reels_tag, 'AdCreativeFeatureDetails' + field :ig_stream_tag, 'AdCreativeFeatureDetails' + field :image_animation, 'AdCreativeFeatureDetails' field :image_auto_crop, 'AdCreativeFeatureDetails' field :image_background_gen, 'AdCreativeFeatureDetails' field :image_brightness_and_contrast, 'AdCreativeFeatureDetails' @@ -42,6 +50,7 @@ class AdCreativeFeaturesSpec < AdObject field :media_liquidity_animated_image, 'AdCreativeFeatureDetails' field :media_order, 'AdCreativeFeatureDetails' field :media_type_automation, 'AdCreativeFeatureDetails' + field :pac_relaxation, 'AdCreativeFeatureDetails' field :product_extensions, 'AdCreativeFeatureDetails' field :product_metadata_automation, 'AdCreativeFeatureDetails' field :product_tags, 'AdCreativeFeatureDetails' @@ -54,6 +63,7 @@ class AdCreativeFeaturesSpec < AdObject field :video_auto_crop, 'AdCreativeFeatureDetails' field :video_filtering, 'AdCreativeFeatureDetails' field :video_highlight, 'AdCreativeFeatureDetails' + field :video_uncrop, 'AdCreativeFeatureDetails' has_no_id has_no_get has_no_post diff --git a/lib/facebook_ads/ad_objects/ad_creative_object_story_spec.rb b/lib/facebook_ads/ad_objects/ad_creative_object_story_spec.rb index 89369f79..d741d7b1 100644 --- a/lib/facebook_ads/ad_objects/ad_creative_object_story_spec.rb +++ b/lib/facebook_ads/ad_objects/ad_creative_object_story_spec.rb @@ -19,9 +19,10 @@ class AdCreativeObjectStorySpec < AdObject field :link_data, 'AdCreativeLinkData' field :page_id, 'string' field :photo_data, 'AdCreativePhotoData' + field :product_data, { list: 'AdCreativeProductData' } field :template_data, 'AdCreativeLinkData' field :text_data, 'AdCreativeTextData' - field :threads_actor_id, 'string' + field :threads_user_id, 'string' field :video_data, 'AdCreativeVideoData' has_no_id has_no_get diff --git a/lib/facebook_ads/ad_objects/dog_notification_settings.rb b/lib/facebook_ads/ad_objects/ad_creative_product_data.rb similarity index 75% rename from lib/facebook_ads/ad_objects/dog_notification_settings.rb rename to lib/facebook_ads/ad_objects/ad_creative_product_data.rb index edcc6558..2205a56e 100644 --- a/lib/facebook_ads/ad_objects/dog_notification_settings.rb +++ b/lib/facebook_ads/ad_objects/ad_creative_product_data.rb @@ -13,11 +13,12 @@ module FacebookAds # on github and we'll fix in our codegen framework. We'll not be able to accept # pull request for this class. - class DogNotificationSettings < AdObject + class AdCreativeProductData < AdObject - field :dog_check_key, 'string' - field :id, 'string' - field :subscription_status_per_channel, { list: 'hash' } + field :product_id, 'string' + field :product_source, 'string' + has_no_id + has_no_get has_no_post has_no_delete diff --git a/lib/facebook_ads/ad_objects/ad_preview.rb b/lib/facebook_ads/ad_objects/ad_preview.rb index 7e68171b..13e8812c 100644 --- a/lib/facebook_ads/ad_objects/ad_preview.rb +++ b/lib/facebook_ads/ad_objects/ad_preview.rb @@ -55,6 +55,7 @@ class AdPreview < AdObject "INSTREAM_BANNER_IMMERSIVE_MOBILE", "INSTREAM_BANNER_MOBILE", "INSTREAM_VIDEO_DESKTOP", + "INSTREAM_VIDEO_FULLSCREEN_IOS", "INSTREAM_VIDEO_FULLSCREEN_MOBILE", "INSTREAM_VIDEO_IMAGE", "INSTREAM_VIDEO_IMMERSIVE_MOBILE", diff --git a/lib/facebook_ads/ad_objects/ad_promoted_object.rb b/lib/facebook_ads/ad_objects/ad_promoted_object.rb index c8476b8c..78d0961a 100644 --- a/lib/facebook_ads/ad_objects/ad_promoted_object.rb +++ b/lib/facebook_ads/ad_objects/ad_promoted_object.rb @@ -55,6 +55,7 @@ class AdPromotedObject < AdObject field :custom_event_type, { enum: -> { CUSTOM_EVENT_TYPE }} field :event_id, 'string' field :fundraiser_campaign_id, 'string' + field :lead_ads_form_event_source_type, 'string' field :mcme_conversion_id, 'string' field :object_store_url, 'string' field :offer_id, 'string' @@ -72,6 +73,8 @@ class AdPromotedObject < AdObject field :product_set, 'ProductSet' field :product_set_id, 'string' field :retention_days, 'string' + field :value_semantic_type, 'string' + field :variation, 'string' field :whatsapp_phone_number, 'string' has_no_id has_no_get diff --git a/lib/facebook_ads/ad_objects/ad_rule.rb b/lib/facebook_ads/ad_objects/ad_rule.rb index 3ebb3686..53f0864c 100644 --- a/lib/facebook_ads/ad_objects/ad_rule.rb +++ b/lib/facebook_ads/ad_objects/ad_rule.rb @@ -57,6 +57,7 @@ class AdRule < AdObject field :account_id, 'string' field :created_by, 'User' field :created_time, 'datetime' + field :disable_error_code, 'int' field :evaluation_spec, 'AdRuleEvaluationSpec' field :execution_spec, 'AdRuleExecutionSpec' field :id, 'string' diff --git a/lib/facebook_ads/ad_objects/ad_rule_history.rb b/lib/facebook_ads/ad_objects/ad_rule_history.rb index bd7a9fa4..43ee9776 100644 --- a/lib/facebook_ads/ad_objects/ad_rule_history.rb +++ b/lib/facebook_ads/ad_objects/ad_rule_history.rb @@ -18,13 +18,17 @@ class AdRuleHistory < AdObject "BUDGET_NOT_REDISTRIBUTED", "CHANGED_BID", "CHANGED_BUDGET", + "CONSOLIDATE_ASC_FRAGMENTATION", + "CONVERT_ASC_CP_SINGLE_INSTANCE", "EMAIL", "ENABLE_ADVANTAGE_CAMPAIGN_BUDGET", "ENABLE_ADVANTAGE_PLUS_CREATIVE", "ENABLE_ADVANTAGE_PLUS_PLACEMENTS", "ENABLE_AUTOFLOW", "ENABLE_GEN_UNCROP", + "ENABLE_LANDING_PAGE_VIEWS", "ENABLE_MUSIC", + "ENABLE_REELS_PLACEMENTS", "ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION", "ENABLE_SHOPS_ADS", "ENDPOINT_PINGED", diff --git a/lib/facebook_ads/ad_objects/ad_set.rb b/lib/facebook_ads/ad_objects/ad_set.rb index 813c30ab..26816882 100644 --- a/lib/facebook_ads/ad_objects/ad_set.rb +++ b/lib/facebook_ads/ad_objects/ad_set.rb @@ -170,11 +170,13 @@ class AdSet < AdObject REGIONAL_REGULATED_CATEGORIES = [ "0", "1", + "2", ] TUNE_FOR_CATEGORY = [ "CREDIT", "EMPLOYMENT", + "FINANCIAL_PRODUCTS_SERVICES", "HOUSING", "ISSUES_ELECTIONS_POLITICS", "NONE", @@ -234,6 +236,8 @@ class AdSet < AdObject field :lifetime_imps, 'int' field :lifetime_min_spend_target, 'string' field :lifetime_spend_cap, 'string' + field :max_budget_spend_percentage, 'string' + field :min_budget_spend_percentage, 'string' field :multi_optimization_goal_weight, 'string' field :name, 'string' field :optimization_goal, { enum: -> { OPTIMIZATION_GOAL }} diff --git a/lib/facebook_ads/ad_objects/ad_video.rb b/lib/facebook_ads/ad_objects/ad_video.rb index 65e0277d..15b5a340 100644 --- a/lib/facebook_ads/ad_objects/ad_video.rb +++ b/lib/facebook_ads/ad_objects/ad_video.rb @@ -360,11 +360,10 @@ class AdVideo < AdObject field :formatting, { enum: -> { FORMATTING }} field :fov, 'int' field :front_z_rotation, 'double' - field :fun_fact_prompt_id, 'int' + field :fun_fact_prompt_id, 'string' field :fun_fact_toastee_id, 'int' field :guide, { list: { list: 'int' } } field :guide_enabled, 'bool' - field :holiday_card, 'string' field :initial_heading, 'int' field :initial_pitch, 'int' field :instant_game_entry_point_data, 'string' @@ -373,7 +372,6 @@ class AdVideo < AdObject field :is_voice_clip, 'bool' field :location_source_id, 'string' field :name, 'string' - field :offer_like_post_id, 'int' field :og_action_type_id, 'string' field :og_icon_id, 'string' field :og_object_id, 'string' diff --git a/lib/facebook_ads/ad_objects/ads_insights.rb b/lib/facebook_ads/ad_objects/ads_insights.rb index b89f2836..8f63368c 100644 --- a/lib/facebook_ads/ad_objects/ads_insights.rb +++ b/lib/facebook_ads/ad_objects/ads_insights.rb @@ -61,6 +61,7 @@ class AdsInsights < AdObject "age", "app_id", "body_asset", + "breakdown_reporting_ad_id", "call_to_action_asset", "coarse_conversion_value", "conversion_destination", @@ -88,6 +89,7 @@ class AdsInsights < AdObject "media_format", "media_origin_url", "media_text_content", + "media_type", "mmm", "place_page_id", "platform_position", @@ -174,6 +176,7 @@ class AdsInsights < AdObject field :auction_bid, 'string' field :auction_competitiveness, 'string' field :auction_max_competitor_bid, 'string' + field :average_purchases_conversion_value, { list: 'AdsActionStats' } field :buying_type, 'string' field :campaign_id, 'string' field :campaign_name, 'string' @@ -238,9 +241,6 @@ class AdsInsights < AdObject field :instant_experience_outbound_clicks, { list: 'AdsActionStats' } field :interactive_component_tap, { list: 'AdsActionStats' } field :labels, 'string' - field :landing_page_view_actions_per_link_click, { list: 'AdsActionStats' } - field :landing_page_view_per_purchase_rate, { list: 'AdsActionStats' } - field :link_clicks_per_results, { list: 'AdsActionStats' } field :location, 'string' field :marketing_messages_cost_per_delivered, 'string' field :marketing_messages_cost_per_link_btn_click, 'string' @@ -254,7 +254,6 @@ class AdsInsights < AdObject field :outbound_clicks_ctr, { list: 'AdsActionStats' } field :place_page_name, 'string' field :purchase_roas, { list: 'AdsActionStats' } - field :purchases_per_link_click, { list: 'AdsActionStats' } field :qualifying_question_qualify_answer_rate, 'string' field :quality_ranking, 'string' field :reach, 'string' diff --git a/lib/facebook_ads/ad_objects/panel_api_report.rb b/lib/facebook_ads/ad_objects/ads_quick_views.rb similarity index 65% rename from lib/facebook_ads/ad_objects/panel_api_report.rb rename to lib/facebook_ads/ad_objects/ads_quick_views.rb index efc4f25f..4c684a6d 100644 --- a/lib/facebook_ads/ad_objects/panel_api_report.rb +++ b/lib/facebook_ads/ad_objects/ads_quick_views.rb @@ -13,18 +13,16 @@ module FacebookAds # on github and we'll fix in our codegen framework. We'll not be able to accept # pull request for this class. - class PanelApiReport < AdObject + class AdsQuickViews < AdObject - field :checksum, 'string' - field :download_url, 'string' - field :end_date, 'datetime' - field :export_file_type, 'string' + field :attribution_windows, { list: 'string' } + field :breakdowns, { list: 'string' } + field :column_fields, { list: 'string' } + field :description, 'string' field :id, 'string' - field :index, 'int' field :name, 'string' - field :number_of_chunks, 'int' - field :start_date, 'datetime' - field :upload_date, 'datetime' + field :permission, 'string' + field :sort, { list: 'object' } has_no_post has_no_delete diff --git a/lib/facebook_ads/ad_objects/ads_user_settings.rb b/lib/facebook_ads/ad_objects/ads_user_settings.rb index 158793f1..c6d955c4 100644 --- a/lib/facebook_ads/ad_objects/ads_user_settings.rb +++ b/lib/facebook_ads/ad_objects/ads_user_settings.rb @@ -16,6 +16,7 @@ module FacebookAds class AdsUserSettings < AdObject field :a_plus_c_survey_seen, 'bool' + field :add_overlays_opt_in_status, 'string' field :adgroup_name_template, 'object' field :ads_cs_catalog_opt_out_timestamp, { list: 'hash' } field :ads_tool_visits, { list: 'object' } @@ -37,6 +38,7 @@ class AdsUserSettings < AdObject field :focus_mode_default, 'string' field :gen_ai_alpha_test_status, 'int' field :id, 'string' + field :image_background_generation_opt_in_status, 'string' field :image_expansion_opt_in_status, 'string' field :is_ads_ai_consented, 'bool' field :is_cbo_default_on, 'bool' diff --git a/lib/facebook_ads/ad_objects/ads_value_adjustment_rule_collection.rb b/lib/facebook_ads/ad_objects/ads_value_adjustment_rule_collection.rb index e4650e0e..9311174b 100644 --- a/lib/facebook_ads/ad_objects/ads_value_adjustment_rule_collection.rb +++ b/lib/facebook_ads/ad_objects/ads_value_adjustment_rule_collection.rb @@ -20,7 +20,7 @@ class AdsValueAdjustmentRuleCollection < AdObject has_no_post has_no_delete - has_edge :personas do |edge| + has_edge :rules do |edge| edge.get end diff --git a/lib/facebook_ads/ad_objects/alm_ad_account_info.rb b/lib/facebook_ads/ad_objects/alm_ad_account_info.rb index c6e16e0f..e08c08f7 100644 --- a/lib/facebook_ads/ad_objects/alm_ad_account_info.rb +++ b/lib/facebook_ads/ad_objects/alm_ad_account_info.rb @@ -18,6 +18,7 @@ class AlmAdAccountInfo < AdObject field :ad_account_id, 'string' field :id, 'string' field :managed_by, 'string' + field :owned_by, 'string' field :parent_advertiser_id, 'string' field :sub_vertical, 'string' field :tag, { list: 'string' } diff --git a/lib/facebook_ads/ad_objects/application.rb b/lib/facebook_ads/ad_objects/application.rb index 5a1daf00..ba811347 100644 --- a/lib/facebook_ads/ad_objects/application.rb +++ b/lib/facebook_ads/ad_objects/application.rb @@ -65,17 +65,6 @@ class Application < AdObject "EYMT", ] - LOGGING_SOURCE = [ - "DETECTION", - "MESSENGER_BOT", - ] - - LOGGING_TARGET = [ - "APP", - "APP_AND_PAGE", - "PAGE", - ] - OWNER_PERMISSIONS = [ "DEVELOP", "MANAGE", @@ -251,6 +240,7 @@ class Application < AdObject api.has_param :data_processing_options_state, 'int' api.has_param :device_token, 'string' api.has_param :event, { enum: %w{CUSTOM_APP_EVENTS DEFERRED_APP_LINK MOBILE_APP_INSTALL }} + api.has_param :event_id, 'string' api.has_param :extinfo, 'object' api.has_param :include_dwell_data, 'bool' api.has_param :include_video_data, 'bool' @@ -471,6 +461,12 @@ class Application < AdObject edge.get 'AdsDataset' end + has_edge :message_templates do |edge| + edge.get do |api| + api.has_param :template_id, 'string' + end + end + has_edge :mmp_auditing do |edge| edge.post do |api| api.has_param :advertiser_id, 'string' @@ -525,18 +521,6 @@ class Application < AdObject end end - has_edge :page_activities do |edge| - edge.post 'Application' do |api| - api.has_param :advertiser_tracking_enabled, 'bool' - api.has_param :application_tracking_enabled, 'bool' - api.has_param :custom_events, { list: 'object' } - api.has_param :logging_source, { enum: -> { Application::LOGGING_SOURCE }} - api.has_param :logging_target, { enum: -> { Application::LOGGING_TARGET }} - api.has_param :page_id, 'int' - api.has_param :page_scoped_user_id, 'int' - end - end - has_edge :payment_currencies do |edge| edge.post 'Application' do |api| api.has_param :currency_url, 'string' diff --git a/lib/facebook_ads/ad_objects/business.rb b/lib/facebook_ads/ad_objects/business.rb index 43234f16..2e1e7e6c 100644 --- a/lib/facebook_ads/ad_objects/business.rb +++ b/lib/facebook_ads/ad_objects/business.rb @@ -1490,11 +1490,10 @@ class Business < AdObject api.has_param :formatting, { enum: -> { AdVideo::FORMATTING }} api.has_param :fov, 'int' api.has_param :front_z_rotation, 'double' - api.has_param :fun_fact_prompt_id, 'int' + api.has_param :fun_fact_prompt_id, 'string' api.has_param :fun_fact_toastee_id, 'int' api.has_param :guide, { list: { list: 'int' } } api.has_param :guide_enabled, 'bool' - api.has_param :holiday_card, 'string' api.has_param :initial_heading, 'int' api.has_param :initial_pitch, 'int' api.has_param :instant_game_entry_point_data, 'string' @@ -1502,7 +1501,6 @@ class Business < AdObject api.has_param :is_group_linking_post, 'bool' api.has_param :is_voice_clip, 'bool' api.has_param :location_source_id, 'string' - api.has_param :offer_like_post_id, 'int' api.has_param :og_action_type_id, 'string' api.has_param :og_icon_id, 'string' api.has_param :og_object_id, 'string' diff --git a/lib/facebook_ads/ad_objects/campaign.rb b/lib/facebook_ads/ad_objects/campaign.rb index 97152066..e0d8e71a 100644 --- a/lib/facebook_ads/ad_objects/campaign.rb +++ b/lib/facebook_ads/ad_objects/campaign.rb @@ -104,6 +104,7 @@ class Campaign < AdObject SPECIAL_AD_CATEGORIES = [ "CREDIT", "EMPLOYMENT", + "FINANCIAL_PRODUCTS_SERVICES", "HOUSING", "ISSUES_ELECTIONS_POLITICS", "NONE", @@ -372,6 +373,7 @@ class Campaign < AdObject SPECIAL_AD_CATEGORY = [ "CREDIT", "EMPLOYMENT", + "FINANCIAL_PRODUCTS_SERVICES", "HOUSING", "ISSUES_ELECTIONS_POLITICS", "NONE", diff --git a/lib/facebook_ads/ad_objects/catalog_item_rejection_reasons.rb b/lib/facebook_ads/ad_objects/catalog_item_rejection_reasons.rb index 346a0daf..44020ed8 100644 --- a/lib/facebook_ads/ad_objects/catalog_item_rejection_reasons.rb +++ b/lib/facebook_ads/ad_objects/catalog_item_rejection_reasons.rb @@ -14,17 +14,8 @@ module FacebookAds # pull request for this class. class CatalogItemRejectionReasons < AdObject - CAPABILITY = [ - "business_inbox_in_messenger", - "shops", - "test_capability", - "universal_checkout", - "us_marketplace", - "whatsapp_marketing_message", - ] - - field :capability, { enum: -> { CAPABILITY }} + field :capability, 'string' field :rejection_information, { list: 'object' } has_no_id has_no_get diff --git a/lib/facebook_ads/ad_objects/ctwa_whats_app_numbers_info.rb b/lib/facebook_ads/ad_objects/ctwa_whats_app_numbers_info.rb index e5e2164d..5cd5362e 100644 --- a/lib/facebook_ads/ad_objects/ctwa_whats_app_numbers_info.rb +++ b/lib/facebook_ads/ad_objects/ctwa_whats_app_numbers_info.rb @@ -18,6 +18,7 @@ class CtwaWhatsAppNumbersInfo < AdObject field :can_manage_wa_flows, 'bool' field :formatted_whatsapp_number, 'string' field :is_business_number, 'bool' + field :number_country_prefix, 'string' field :page_whatsapp_number_id, 'string' field :waba_id, 'string' field :whatsapp_number, 'string' diff --git a/lib/facebook_ads/ad_objects/custom_audience.rb b/lib/facebook_ads/ad_objects/custom_audience.rb index 10918c36..e671c81e 100644 --- a/lib/facebook_ads/ad_objects/custom_audience.rb +++ b/lib/facebook_ads/ad_objects/custom_audience.rb @@ -48,6 +48,11 @@ class CustomAudience < AdObject "USER_PROVIDED_ONLY", ] + SUBSCRIPTION_INFO = [ + "MESSENGER", + "WHATSAPP", + ] + SUBTYPE = [ "APP", "BAG_OF_ACCOUNTS", @@ -60,6 +65,7 @@ class CustomAudience < AdObject "LOOKALIKE", "MANAGED", "MEASUREMENT", + "MESSENGER_SUBSCRIBER_LIST", "OFFLINE_CONVERSION", "PARTNER", "PRIMARY", @@ -70,6 +76,11 @@ class CustomAudience < AdObject "WEBSITE", ] + USE_FOR_PRODUCTS = [ + "ADS", + "MARKETING_MESSAGES", + ] + ACTION_SOURCE = [ "PHYSICAL_STORE", "WEBSITE", @@ -126,13 +137,17 @@ class CustomAudience < AdObject field :event_source_group, 'string' field :event_sources, { list: 'hash' } field :exclusions, { list: 'object' } + field :facebook_page_id, 'string' field :inclusions, { list: 'object' } field :list_of_accounts, { list: 'int' } + field :marketing_message_channels, 'object' field :origin_audience_id, 'string' field :parent_audience_id, 'int' field :partner_reference_key, 'string' field :prefill, 'bool' field :product_set_id, 'string' + field :subscription_info, { list: { enum: -> { SUBSCRIPTION_INFO }} } + field :use_for_products, { list: { enum: -> { USE_FOR_PRODUCTS }} } field :use_in_campaigns, 'bool' field :video_group_ids, { list: 'string' } field :whats_app_business_phone_number_id, 'string' diff --git a/lib/facebook_ads/ad_objects/extended_credit.rb b/lib/facebook_ads/ad_objects/extended_credit.rb index 61b3c9e1..4208024e 100644 --- a/lib/facebook_ads/ad_objects/extended_credit.rb +++ b/lib/facebook_ads/ad_objects/extended_credit.rb @@ -58,6 +58,19 @@ class ExtendedCredit < AdObject end end + has_edge :whatsapp_credit_attach do |edge| + edge.post do |api| + api.has_param :waba_currency, 'string' + api.has_param :waba_id, 'string' + end + end + + has_edge :whatsapp_credit_sharing do |edge| + edge.post do |api| + api.has_param :receiving_business_id, 'string' + end + end + has_edge :whatsapp_credit_sharing_and_attach do |edge| edge.post do |api| api.has_param :waba_currency, 'string' diff --git a/lib/facebook_ads/ad_objects/group.rb b/lib/facebook_ads/ad_objects/group.rb index c4d40c89..8d249bfe 100644 --- a/lib/facebook_ads/ad_objects/group.rb +++ b/lib/facebook_ads/ad_objects/group.rb @@ -121,20 +121,6 @@ class Group < AdObject has_edge :albums do |edge| edge.get 'Album' - edge.post 'Album' do |api| - api.has_param :contributors, { list: 'int' } - api.has_param :description, 'string' - api.has_param :is_default, 'bool' - api.has_param :location, 'string' - api.has_param :make_shared_album, 'bool' - api.has_param :message, 'string' - api.has_param :name, 'string' - api.has_param :place, 'object' - api.has_param :privacy, 'string' - api.has_param :session_id, 'string' - api.has_param :tags, { list: 'int' } - api.has_param :visible, 'string' - end end has_edge :docs do |edge| @@ -160,7 +146,7 @@ class Group < AdObject api.has_param :android_key_hash, 'string' api.has_param :application_id, 'string' api.has_param :asked_fun_fact_prompt_id, 'int' - api.has_param :asset3d_id, 'int' + api.has_param :asset3d_id, 'string' api.has_param :associated_id, 'string' api.has_param :attach_place_suggestion, 'bool' api.has_param :attached_media, { list: 'object' } @@ -191,10 +177,9 @@ class Group < AdObject api.has_param :expanded_width, 'int' api.has_param :feed_targeting, 'object' api.has_param :formatting, { enum: -> { Post::FORMATTING }} - api.has_param :fun_fact_prompt_id, 'int' + api.has_param :fun_fact_prompt_id, 'string' api.has_param :fun_fact_toastee_id, 'int' api.has_param :height, 'int' - api.has_param :holiday_card, 'string' api.has_param :home_checkin_city_id, 'object' api.has_param :image_crops, 'hash' api.has_param :implicit_with_tags, { list: 'int' } @@ -215,7 +200,6 @@ class Group < AdObject api.has_param :name, 'string' api.has_param :nectar_module, 'string' api.has_param :object_attachment, 'string' - api.has_param :offer_like_post_id, 'int' api.has_param :og_action_type_id, 'string' api.has_param :og_hide_object_attachment, 'bool' api.has_param :og_icon_id, 'string' @@ -426,11 +410,10 @@ class Group < AdObject api.has_param :formatting, { enum: -> { AdVideo::FORMATTING }} api.has_param :fov, 'int' api.has_param :front_z_rotation, 'double' - api.has_param :fun_fact_prompt_id, 'int' + api.has_param :fun_fact_prompt_id, 'string' api.has_param :fun_fact_toastee_id, 'int' api.has_param :guide, { list: { list: 'int' } } api.has_param :guide_enabled, 'bool' - api.has_param :holiday_card, 'string' api.has_param :initial_heading, 'int' api.has_param :initial_pitch, 'int' api.has_param :instant_game_entry_point_data, 'string' @@ -440,7 +423,6 @@ class Group < AdObject api.has_param :is_voice_clip, 'bool' api.has_param :location_source_id, 'string' api.has_param :manual_privacy, 'bool' - api.has_param :offer_like_post_id, 'int' api.has_param :og_action_type_id, 'string' api.has_param :og_icon_id, 'string' api.has_param :og_object_id, 'string' diff --git a/lib/facebook_ads/ad_objects/hotel.rb b/lib/facebook_ads/ad_objects/hotel.rb index 2a8be799..92086ce2 100644 --- a/lib/facebook_ads/ad_objects/hotel.rb +++ b/lib/facebook_ads/ad_objects/hotel.rb @@ -46,6 +46,11 @@ class Hotel < AdObject field :margin_level, 'int' field :name, 'string' field :phone, 'string' + field :product_priority_0, 'double' + field :product_priority_1, 'double' + field :product_priority_2, 'double' + field :product_priority_3, 'double' + field :product_priority_4, 'double' field :sale_price, 'string' field :sanitized_images, { list: 'string' } field :star_rating, 'double' diff --git a/lib/facebook_ads/ad_objects/ig_media_for_ig_only_api.rb b/lib/facebook_ads/ad_objects/ig_media_for_ig_only_api.rb index 2e99d34f..444462f7 100644 --- a/lib/facebook_ads/ad_objects/ig_media_for_ig_only_api.rb +++ b/lib/facebook_ads/ad_objects/ig_media_for_ig_only_api.rb @@ -43,5 +43,13 @@ class IgMediaForIgOnlyApi < AdObject end end + has_edge :insights do |edge| + edge.get 'InsightsResult' do |api| + api.has_param :breakdown, { list: { enum: -> { InsightsResult::BREAKDOWN }} } + api.has_param :metric, { list: { enum: -> { InsightsResult::METRIC }} } + api.has_param :period, { list: { enum: -> { InsightsResult::PERIOD }} } + end + end + end end diff --git a/lib/facebook_ads/ad_objects/ig_user_for_ig_only_api.rb b/lib/facebook_ads/ad_objects/ig_user_for_ig_only_api.rb index 3ad69a04..0bbcef77 100644 --- a/lib/facebook_ads/ad_objects/ig_user_for_ig_only_api.rb +++ b/lib/facebook_ads/ad_objects/ig_user_for_ig_only_api.rb @@ -136,6 +136,12 @@ class IgUserForIgOnlyApi < AdObject api.has_param :app_id, 'string' api.has_param :flow_id, 'string' end + edge.post do |api| + api.has_param :eligible_platforms, { list: { enum: %w{INSTAGRAM MESSENGER WHATSAPP }} } + api.has_param :flow_id, 'string' + api.has_param :name, 'string' + api.has_param :welcome_message_flow, { list: 'object' } + end end end diff --git a/lib/facebook_ads/ad_objects/insights_result.rb b/lib/facebook_ads/ad_objects/insights_result.rb index 7f9250d9..decb0975 100644 --- a/lib/facebook_ads/ad_objects/insights_result.rb +++ b/lib/facebook_ads/ad_objects/insights_result.rb @@ -14,6 +14,49 @@ module FacebookAds # pull request for this class. class InsightsResult < AdObject + BREAKDOWN = [ + "action_type", + "follow_type", + "story_navigation_action_type", + "surface_type", + ] + + METRIC = [ + "clips_replays_count", + "comments", + "follows", + "ig_reels_aggregated_all_plays_count", + "ig_reels_avg_watch_time", + "ig_reels_video_view_total_time", + "impressions", + "likes", + "navigation", + "peak_concurrent_viewers", + "plays", + "profile_activity", + "profile_visits", + "quotes", + "reach", + "replies", + "reposts", + "saved", + "shares", + "thread_replies", + "thread_shares", + "total_interactions", + "video_views", + "views", + ] + + PERIOD = [ + "day", + "days_28", + "lifetime", + "month", + "total_over_range", + "week", + ] + DATE_PRESET = [ "data_maximum", "last_14d", @@ -37,25 +80,6 @@ class InsightsResult < AdObject "yesterday", ] - PERIOD = [ - "day", - "days_28", - "lifetime", - "month", - "total_over_range", - "week", - ] - - METRIC = [ - "PAGES_FB_STORY_REPLIES", - "PAGES_FB_STORY_SHARES", - "PAGES_FB_STORY_STICKER_INTERACTIONS", - "PAGES_FB_STORY_THREAD_LIGHTWEIGHT_REACTIONS", - "PAGE_STORY_IMPRESSIONS_BY_STORY_ID", - "PAGE_STORY_IMPRESSIONS_BY_STORY_ID_UNIQUE", - "STORY_INTERACTION", - ] - field :description, 'string' field :description_from_api_doc, 'string' diff --git a/lib/facebook_ads/ad_objects/instagram_insights_result.rb b/lib/facebook_ads/ad_objects/instagram_insights_result.rb index 0c733466..5d77e5d9 100644 --- a/lib/facebook_ads/ad_objects/instagram_insights_result.rb +++ b/lib/facebook_ads/ad_objects/instagram_insights_result.rb @@ -42,6 +42,7 @@ class InstagramInsightsResult < AdObject "saved", "shares", "thread_replies", + "thread_shares", "total_interactions", "video_views", "views", diff --git a/lib/facebook_ads/ad_objects/messenger_business_template.rb b/lib/facebook_ads/ad_objects/messenger_business_template.rb new file mode 100644 index 00000000..d4f1e0d1 --- /dev/null +++ b/lib/facebook_ads/ad_objects/messenger_business_template.rb @@ -0,0 +1,33 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +# FB:AUTOGEN + +module FacebookAds + # This class is auto-generated. + + # For any issues or feature requests related to this class, please let us know + # on github and we'll fix in our codegen framework. We'll not be able to accept + # pull request for this class. + + class MessengerBusinessTemplate < AdObject + + field :category, 'string' + field :components, { list: 'object' } + field :creation_time, 'int' + field :id, 'string' + field :language, 'string' + field :language_count, 'int' + field :last_updated_time, 'datetime' + field :library_template_name, 'string' + field :name, 'string' + field :rejected_reason, 'string' + field :status, 'string' + has_no_post + has_no_delete + + end +end diff --git a/lib/facebook_ads/ad_objects/page.rb b/lib/facebook_ads/ad_objects/page.rb index cbec94c7..6972c0d1 100644 --- a/lib/facebook_ads/ad_objects/page.rb +++ b/lib/facebook_ads/ad_objects/page.rb @@ -762,6 +762,10 @@ class Page < AdObject edge.get 'Page' end + has_edge :ctx_optimization_eligibility do |edge| + edge.get 'CtxOptimizationEligibility' + end + has_edge :custom_labels do |edge| edge.get 'PageUserMessageThreadLabel' edge.post 'PageUserMessageThreadLabel' do |api| @@ -824,7 +828,7 @@ class Page < AdObject api.has_param :android_key_hash, 'string' api.has_param :application_id, 'string' api.has_param :asked_fun_fact_prompt_id, 'int' - api.has_param :asset3d_id, 'int' + api.has_param :asset3d_id, 'string' api.has_param :associated_id, 'string' api.has_param :attach_place_suggestion, 'bool' api.has_param :attached_media, { list: 'object' } @@ -856,10 +860,9 @@ class Page < AdObject api.has_param :expanded_width, 'int' api.has_param :feed_targeting, 'object' api.has_param :formatting, { enum: -> { Page::FORMATTING }} - api.has_param :fun_fact_prompt_id, 'int' + api.has_param :fun_fact_prompt_id, 'string' api.has_param :fun_fact_toastee_id, 'int' api.has_param :height, 'int' - api.has_param :holiday_card, 'string' api.has_param :home_checkin_city_id, 'object' api.has_param :image_crops, 'hash' api.has_param :implicit_with_tags, { list: 'int' } @@ -880,7 +883,6 @@ class Page < AdObject api.has_param :name, 'string' api.has_param :nectar_module, 'string' api.has_param :object_attachment, 'string' - api.has_param :offer_like_post_id, 'int' api.has_param :og_action_type_id, 'string' api.has_param :og_hide_object_attachment, 'bool' api.has_param :og_icon_id, 'string' @@ -1551,11 +1553,10 @@ class Page < AdObject api.has_param :formatting, { enum: -> { AdVideo::FORMATTING }} api.has_param :fov, 'int' api.has_param :front_z_rotation, 'double' - api.has_param :fun_fact_prompt_id, 'int' + api.has_param :fun_fact_prompt_id, 'string' api.has_param :fun_fact_toastee_id, 'int' api.has_param :guide, { list: { list: 'int' } } api.has_param :guide_enabled, 'bool' - api.has_param :holiday_card, 'string' api.has_param :initial_heading, 'int' api.has_param :initial_pitch, 'int' api.has_param :instant_game_entry_point_data, 'string' @@ -1567,7 +1568,6 @@ class Page < AdObject api.has_param :manual_privacy, 'bool' api.has_param :multilingual_data, { list: 'object' } api.has_param :no_story, 'bool' - api.has_param :offer_like_post_id, 'int' api.has_param :og_action_type_id, 'string' api.has_param :og_icon_id, 'string' api.has_param :og_object_id, 'string' diff --git a/lib/facebook_ads/ad_objects/partnership_ad_content_search_media.rb b/lib/facebook_ads/ad_objects/partnership_ad_content_search_media.rb index a6d856b3..6aee309c 100644 --- a/lib/facebook_ads/ad_objects/partnership_ad_content_search_media.rb +++ b/lib/facebook_ads/ad_objects/partnership_ad_content_search_media.rb @@ -15,8 +15,11 @@ module FacebookAds class PartnershipAdContentSearchMedia < AdObject + field :ig_ad_code_sponsor_count, 'int' + field :ig_ad_code_sponsors, { list: 'FbPageAndInstagramAccount' } field :ig_media, 'IgMedia' field :ig_media_has_product_tags, 'bool' + field :is_ad_code_eligible_for_boosting_by_two_sponsors, 'bool' field :is_ad_code_entry, 'bool' has_no_id has_no_get diff --git a/lib/facebook_ads/ad_objects/placement.rb b/lib/facebook_ads/ad_objects/placement.rb new file mode 100644 index 00000000..8d02bd8f --- /dev/null +++ b/lib/facebook_ads/ad_objects/placement.rb @@ -0,0 +1,52 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +# FB:AUTOGEN + +module FacebookAds + # This class is auto-generated. + + # For any issues or feature requests related to this class, please let us know + # on github and we'll fix in our codegen framework. We'll not be able to accept + # pull request for this class. + + class Placement < AdObject + DEVICE_PLATFORMS = [ + "desktop", + "mobile", + ] + + EFFECTIVE_DEVICE_PLATFORMS = [ + "desktop", + "mobile", + ] + + + field :audience_network_positions, { list: 'string' } + field :device_platforms, { list: { enum: -> { DEVICE_PLATFORMS }} } + field :effective_audience_network_positions, { list: 'string' } + field :effective_device_platforms, { list: { enum: -> { EFFECTIVE_DEVICE_PLATFORMS }} } + field :effective_facebook_positions, { list: 'string' } + field :effective_instagram_positions, { list: 'string' } + field :effective_messenger_positions, { list: 'string' } + field :effective_oculus_positions, { list: 'string' } + field :effective_publisher_platforms, { list: 'string' } + field :effective_threads_positions, { list: 'string' } + field :effective_whatsapp_positions, { list: 'string' } + field :facebook_positions, { list: 'string' } + field :instagram_positions, { list: 'string' } + field :messenger_positions, { list: 'string' } + field :oculus_positions, { list: 'string' } + field :publisher_platforms, { list: 'string' } + field :threads_positions, { list: 'string' } + field :whatsapp_positions, { list: 'string' } + has_no_id + has_no_get + has_no_post + has_no_delete + + end +end diff --git a/lib/facebook_ads/ad_objects/product_catalog.rb b/lib/facebook_ads/ad_objects/product_catalog.rb index 349693c7..a04e94c3 100644 --- a/lib/facebook_ads/ad_objects/product_catalog.rb +++ b/lib/facebook_ads/ad_objects/product_catalog.rb @@ -329,6 +329,12 @@ class ProductCatalog < AdObject end end + has_edge :marketplace_partner_sellers_details do |edge| + edge.post 'ProductCatalog' do |api| + api.has_param :requests, 'hash' + end + end + has_edge :pricing_variables_batch do |edge| edge.get 'ProductCatalogPricingVariablesBatch' do |api| api.has_param :handle, 'string' diff --git a/lib/facebook_ads/ad_objects/product_catalog_diagnostic_group.rb b/lib/facebook_ads/ad_objects/product_catalog_diagnostic_group.rb index b5c10e24..f972a3b0 100644 --- a/lib/facebook_ads/ad_objects/product_catalog_diagnostic_group.rb +++ b/lib/facebook_ads/ad_objects/product_catalog_diagnostic_group.rb @@ -14,23 +14,6 @@ module FacebookAds # pull request for this class. class ProductCatalogDiagnosticGroup < AdObject - AFFECTED_CHANNELS = [ - "b2c_marketplace", - "c2c_marketplace", - "da", - "daily_deals", - "daily_deals_legacy", - "ig_product_tagging", - "marketplace", - "marketplace_ads_deprecated", - "marketplace_shops", - "mini_shops", - "offline_conversions", - "shops", - "universal_checkout", - "whatsapp", - ] - AFFECTED_ENTITY = [ "product_catalog", "product_event", @@ -62,6 +45,23 @@ class ProductCatalogDiagnosticGroup < AdObject "SHOPS_VISIBILITY_ISSUES", ] + AFFECTED_CHANNELS = [ + "b2c_marketplace", + "c2c_marketplace", + "da", + "daily_deals", + "daily_deals_legacy", + "ig_product_tagging", + "marketplace", + "marketplace_ads_deprecated", + "marketplace_shops", + "mini_shops", + "offline_conversions", + "shops", + "universal_checkout", + "whatsapp", + ] + AFFECTED_ENTITIES = [ "product_catalog", "product_event", @@ -89,7 +89,7 @@ class ProductCatalogDiagnosticGroup < AdObject ] - field :affected_channels, { list: { enum: -> { AFFECTED_CHANNELS }} } + field :affected_channels, { list: 'string' } field :affected_entity, { enum: -> { AFFECTED_ENTITY }} field :affected_features, { list: { enum: -> { AFFECTED_FEATURES }} } field :diagnostics, { list: 'object' } diff --git a/lib/facebook_ads/ad_objects/product_feed.rb b/lib/facebook_ads/ad_objects/product_feed.rb index 10ad1482..4068f863 100644 --- a/lib/facebook_ads/ad_objects/product_feed.rb +++ b/lib/facebook_ads/ad_objects/product_feed.rb @@ -46,6 +46,7 @@ class ProductFeed < AdObject FEED_TYPE = [ "AUTOMOTIVE_MODEL", + "COLLECTION", "DESTINATION", "FLIGHT", "HOME_LISTING", diff --git a/lib/facebook_ads/ad_objects/product_item.rb b/lib/facebook_ads/ad_objects/product_item.rb index 8e78834e..6a53d89c 100644 --- a/lib/facebook_ads/ad_objects/product_item.rb +++ b/lib/facebook_ads/ad_objects/product_item.rb @@ -34,6 +34,14 @@ class ProductItem < AdObject "preorder", ] + CAPABILITY_TO_REVIEW_STATUS = [ + "APPROVED", + "NO_REVIEW", + "OUTDATED", + "PENDING", + "REJECTED", + ] + CONDITION = [ "cpo", "new", @@ -369,6 +377,7 @@ class ProductItem < AdObject "INVALID_SUBSCRIPTION_DISABLE_PARAMS", "INVALID_SUBSCRIPTION_ENABLE_PARAMS", "INVALID_SUBSCRIPTION_PARAMS", + "INVALID_TAX_EXTENSION_STATE", "INVALID_VEHICLE_STATE", "INVALID_VIRTUAL_TOUR_URL_DOMAIN", "INVENTORY_ZERO_AVAILABILITY_IN_STOCK", diff --git a/lib/facebook_ads/ad_objects/saved_message_response.rb b/lib/facebook_ads/ad_objects/saved_message_response.rb index 9826c4f8..a9eb9b26 100644 --- a/lib/facebook_ads/ad_objects/saved_message_response.rb +++ b/lib/facebook_ads/ad_objects/saved_message_response.rb @@ -15,7 +15,6 @@ module FacebookAds class SavedMessageResponse < AdObject - field :category, 'string' field :id, 'string' field :image, 'string' field :is_enabled, 'bool' diff --git a/lib/facebook_ads/ad_objects/user.rb b/lib/facebook_ads/ad_objects/user.rb index c8333529..869dcfe6 100644 --- a/lib/facebook_ads/ad_objects/user.rb +++ b/lib/facebook_ads/ad_objects/user.rb @@ -89,9 +89,9 @@ class User < AdObject has_edge :access_tokens do |edge| edge.delete edge.post 'User' do |api| - api.has_param :business_app, 'int' + api.has_param :business_app, 'string' api.has_param :page_id, 'string' - api.has_param :scope, { list: 'Permission' } + api.has_param :scope, { list: 'string' } api.has_param :set_token_expires_in_60_days, 'bool' end end @@ -248,7 +248,7 @@ class User < AdObject api.has_param :android_key_hash, 'string' api.has_param :application_id, 'string' api.has_param :asked_fun_fact_prompt_id, 'int' - api.has_param :asset3d_id, 'int' + api.has_param :asset3d_id, 'string' api.has_param :associated_id, 'string' api.has_param :attach_place_suggestion, 'bool' api.has_param :attached_media, { list: 'object' } @@ -279,10 +279,9 @@ class User < AdObject api.has_param :expanded_width, 'int' api.has_param :feed_targeting, 'object' api.has_param :formatting, { enum: -> { Post::FORMATTING }} - api.has_param :fun_fact_prompt_id, 'int' + api.has_param :fun_fact_prompt_id, 'string' api.has_param :fun_fact_toastee_id, 'int' api.has_param :height, 'int' - api.has_param :holiday_card, 'string' api.has_param :home_checkin_city_id, 'object' api.has_param :image_crops, 'hash' api.has_param :implicit_with_tags, { list: 'int' } @@ -303,7 +302,6 @@ class User < AdObject api.has_param :name, 'string' api.has_param :nectar_module, 'string' api.has_param :object_attachment, 'string' - api.has_param :offer_like_post_id, 'int' api.has_param :og_action_type_id, 'string' api.has_param :og_hide_object_attachment, 'bool' api.has_param :og_icon_id, 'string' @@ -605,11 +603,10 @@ class User < AdObject api.has_param :formatting, { enum: -> { AdVideo::FORMATTING }} api.has_param :fov, 'int' api.has_param :front_z_rotation, 'double' - api.has_param :fun_fact_prompt_id, 'int' + api.has_param :fun_fact_prompt_id, 'string' api.has_param :fun_fact_toastee_id, 'int' api.has_param :guide, { list: { list: 'int' } } api.has_param :guide_enabled, 'bool' - api.has_param :holiday_card, 'string' api.has_param :initial_heading, 'int' api.has_param :initial_pitch, 'int' api.has_param :instant_game_entry_point_data, 'string' @@ -620,7 +617,6 @@ class User < AdObject api.has_param :location_source_id, 'string' api.has_param :manual_privacy, 'bool' api.has_param :no_story, 'bool' - api.has_param :offer_like_post_id, 'int' api.has_param :og_action_type_id, 'string' api.has_param :og_icon_id, 'string' api.has_param :og_object_id, 'string' diff --git a/lib/facebook_ads/ad_objects/vehicle.rb b/lib/facebook_ads/ad_objects/vehicle.rb index c4b08fa3..aaa534d5 100644 --- a/lib/facebook_ads/ad_objects/vehicle.rb +++ b/lib/facebook_ads/ad_objects/vehicle.rb @@ -149,6 +149,11 @@ class Vehicle < AdObject field :previous_currency, 'string' field :previous_price, 'string' field :price, 'string' + field :product_priority_0, 'double' + field :product_priority_1, 'double' + field :product_priority_2, 'double' + field :product_priority_3, 'double' + field :product_priority_4, 'double' field :sale_currency, 'string' field :sale_price, 'string' field :sanitized_images, { list: 'string' } diff --git a/lib/facebook_ads/ad_objects/vehicle_offer.rb b/lib/facebook_ads/ad_objects/vehicle_offer.rb index 68916827..a001f37f 100644 --- a/lib/facebook_ads/ad_objects/vehicle_offer.rb +++ b/lib/facebook_ads/ad_objects/vehicle_offer.rb @@ -61,6 +61,11 @@ class VehicleOffer < AdObject field :offer_disclaimer, 'string' field :offer_type, 'string' field :price, 'string' + field :product_priority_0, 'double' + field :product_priority_1, 'double' + field :product_priority_2, 'double' + field :product_priority_3, 'double' + field :product_priority_4, 'double' field :sanitized_images, { list: 'string' } field :start_date, 'string' field :start_time, 'int' diff --git a/lib/facebook_ads/ad_objects/whats_app_business_account.rb b/lib/facebook_ads/ad_objects/whats_app_business_account.rb index d1c2dcff..47f320fe 100644 --- a/lib/facebook_ads/ad_objects/whats_app_business_account.rb +++ b/lib/facebook_ads/ad_objects/whats_app_business_account.rb @@ -43,6 +43,7 @@ class WhatsAppBusinessAccount < AdObject ] PROVIDER_NAME = [ + "BILLDESK", "PAYU", "RAZORPAY", "UPI_VPA", @@ -95,6 +96,19 @@ class WhatsAppBusinessAccount < AdObject edge.get end + has_edge :call_analytics do |edge| + edge.get do |api| + api.has_param :country_codes, { list: 'string' } + api.has_param :dimensions, { list: { enum: %w{COUNTRY DIRECTION PHONE UNKNOWN }} } + api.has_param :directions, { list: { enum: %w{BUSINESS_INITIATED UNKNOWN USER_INITIATED }} } + api.has_param :end, 'int' + api.has_param :granularity, { enum: %w{DAILY HALF_HOUR MONTHLY }} + api.has_param :metric_types, { list: { enum: %w{AVERAGE_DURATION COST COUNT UNKNOWN }} } + api.has_param :phone_numbers, { list: 'string' } + api.has_param :start, 'int' + end + end + has_edge :conversation_analytics do |edge| edge.get do |api| api.has_param :conversation_categories, { list: { enum: %w{AUTHENTICATION AUTHENTICATION_INTERNATIONAL MARKETING MARKETING_OPTIMIZED_DELIVERY SERVICE UNKNOWN UTILITY UTILITY_FIXED_TEMPLATE }} } @@ -173,6 +187,7 @@ class WhatsAppBusinessAccount < AdObject api.has_param :cta_url_link_tracking_opted_out, 'bool' api.has_param :display_format, { enum: -> { WhatsAppBusinessAccount::DISPLAY_FORMAT }} api.has_param :language, 'string' + api.has_param :library_template_body_inputs, 'hash' api.has_param :library_template_button_inputs, { list: 'hash' } api.has_param :library_template_name, 'string' api.has_param :message_send_ttl_seconds, 'int' diff --git a/lib/facebook_ads/version.rb b/lib/facebook_ads/version.rb index 0dc8c13a..cee63628 100644 --- a/lib/facebook_ads/version.rb +++ b/lib/facebook_ads/version.rb @@ -7,6 +7,6 @@ # FB:AUTOGEN module FacebookAds - VERSION = '20.0.4' - API_VERSION = '20.0' + VERSION = '21.0.0' + API_VERSION = '21.0' end