Skip to content

Commit 369cf39

Browse files
committed
v2.6 Breaking Changes
Summary: - Deprecated the `connectionobjects` API which retrieved all object types and replace it with other APIs that return specific object types - Deprecated `max_product_count` since Facebook now automatically optimizes the number of products to show for Dynamic Product ads. In order to opt-out of Carousel format, specify `force_single_link=true`. - Deprecated `product_ad_behavior` field at the Ad Set level - The `fields` parameter no longer accepts breakdowns, such as age or gender. Now you should specified this in 'breakdowns' parameter in query. This includes:- `age`, `country`, `gender`, `frequency_value`,`hourly_stats_aggregated_by_advertiser_time_zone`, `hourly_stats_aggregated_by_audience_time_zone`, `impression_device`, `place_page_id`, `placement`, `product_id`, and `region`This appplies to /insights for all object levels. Test Plan: Run all tests; Alternatively if you want to check specific breaking changes, choose the one's related to it, e.g. for f in docs/*INSIGHTS*; do ./bin/docsmith.php test $f; done for f in docs/*DPA*; do ./bin/docsmith.php test $f; done
1 parent ab7f880 commit 369cf39

File tree

12 files changed

+10
-273
lines changed

12 files changed

+10
-273
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Facebook Ads API SDK for PHP
22

3+
**IMPORTANT**: This is the legacy SDK. This will be deprecated when API v2.7 is released
4+
Please start migrating to the autogenerated SDK which you can find [here](https://github.com/facebook/facebook-php-ads-sdk).
5+
6+
37
[![Packagist](https://img.shields.io/packagist/v/facebook/php-ads-sdk.svg?style=flat-square)](https://packagist.org/packages/facebook/php-ads-sdk)
48
[![License](https://img.shields.io/badge/license-Facebook%20Platform-blue.svg?style=flat-square)](https://github.com/facebook/facebook-php-ads-sdk/blob/master/LICENSE)
59
[![Travis](https://img.shields.io/travis/facebook/facebook-php-ads-sdk.svg?style=flat-square)](https://travis-ci.org/facebook/facebook-php-ads-sdk)

examples/connectionobjects.php

Lines changed: 0 additions & 112 deletions
This file was deleted.

src/FacebookAds/Api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Api {
3535
/**
3636
* @var string
3737
*/
38-
const VERSION = '2.5.1';
38+
const VERSION = '2.6.0';
3939

4040
/**
4141
* @var Api

src/FacebookAds/Object/AdAccount.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,6 @@ public function getBroadCategoryTargeting(
156156
);
157157
}
158158

159-
/**
160-
* @param array $fields
161-
* @param array $params
162-
* @return Cursor
163-
*/
164-
public function getConnectionObjects(
165-
array $fields = array(), array $params = array()) {
166-
return $this->getManyByConnection(
167-
ConnectionObject::className(), $fields, $params, 'connectionobjects');
168-
}
169-
170159
/**
171160
* @param array $fields
172161
* @param array $params

src/FacebookAds/Object/ConnectionObject.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/FacebookAds/Object/Fields/ConnectionObjectFields.php

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/FacebookAds/Object/Fields/InsightsFields.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class InsightsFields extends AbstractEnum {
4040
const AD_NAME = 'ad_name';
4141
const ADSET_ID = 'adset_id';
4242
const ADSET_NAME = 'adset_name';
43-
const AGE = 'age';
4443
const APP_STORE_CLICKS = 'app_store_clicks';
4544
const BUYING_TYPE = 'buying_type';
4645
const CALL_TO_ACTION_CLICKS = 'call_to_action_clicks';
@@ -54,7 +53,6 @@ class InsightsFields extends AbstractEnum {
5453
const COST_PER_TOTAL_ACTION = 'cost_per_total_action';
5554
const COST_PER_UNIQUE_CLICK = 'cost_per_unique_click';
5655
const COST_PER_UNIQUE_ACTION_TYPE = 'cost_per_unique_action_type';
57-
const COUNTRY = 'country';
5856
const CPM = 'cpm';
5957
const CPP = 'cpp';
6058
const CTR = 'ctr';
@@ -72,23 +70,13 @@ class InsightsFields extends AbstractEnum {
7270
const ESTIMATED_AD_RECALL_RATE_UPPPER_BOUND
7371
= 'estimated_ad_recall_rate_upper_bound';
7472
const FREQUENCY = 'frequency';
75-
const FREQUENCY_VALUE = 'frequency_value';
76-
const GENDER = 'gender';
77-
const HOURLY_STATS_AGGREGATED_BY_ADVERTISER_TIME_ZONE
78-
= 'hourly_stats_aggregated_by_advertiser_time_zone';
79-
const HOURLY_STATS_AGGREGATED_BY_AUDIENCE_TIME_ZONE
80-
= 'hourly_stats_aggregated_by_audience_time_zone';
8173
const IMPRESSIONS = 'impressions';
82-
const IMPRESSION_DEVICE = 'impression_device';
8374
const INLINE_LINK_CLICKS = 'inline_link_clicks';
8475
const INLINE_POST_ENGAGEMENT = 'inline_post_engagement';
8576
const NEWSFEED_AVG_POSITION = 'newsfeed_avg_position';
8677
const NEWSFEED_CLICKS = 'newsfeed_clicks';
8778
const NEWSFEED_IMPRESSIONS = 'newsfeed_impresions';
88-
const PLACEMENT = 'placement';
89-
const PRODUCT_ID = 'product_id';
9079
const REACH = 'reach';
91-
const REGION = 'region';
9280
const RELEVANCE_SCORE = 'relevance_score';
9381
const SOCIAL_CLICKS = 'social_clicks';
9482
const SOCIAL_IMPRESSIONS = 'social_impressions';

src/FacebookAds/Object/Fields/ObjectStory/TemplateDataFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class TemplateDataFields extends AbstractEnum {
3333

3434
const CALL_TO_ACTION = 'call_to_action';
3535
const DESCRIPTION = 'description';
36+
const FORCE_SINGLE_LINK = 'force_single_link';
3637
const LINK = 'link';
3738
const MESSAGE = 'message';
3839
const NAME = 'name';
39-
const MAX_PRODUCT_COUNT = 'max_product_count';
4040
const PICTURE = 'picture';
4141
}

src/FacebookAds/Object/Values/ConnectionObjectTypes.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/FacebookAds/Object/Values/InsightsBreakdowns.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ class InsightsBreakdowns extends AbstractEnum {
3333

3434
const AGE = 'age';
3535
const COUNTRY = 'country';
36+
const FREQUENCY_VALUE = 'frequency_value';
3637
const GENDER = 'gender';
3738
const HOURLY_STATS_AGGREGATED_BY_ADVERTISER_TIME_ZONE =
3839
'hourly_stats_aggregated_by_advertiser_time_zone';
3940
const HOURLY_STATS_AGGREGATED_BY_AUDIENCE_TIME_ZONE =
4041
'hourly_stats_aggregated_by_audience_time_zone';
4142
const IMPRESSION_DEVICE = 'impression_device';
42-
const PLACE_PAGE_ID = 'place_page_id';
4343
const PLACEMENT = 'placement';
44+
const PLACE_PAGE_ID = 'place_page_id';
45+
const PRODUCT_ID = 'product_id';
46+
const REGION = 'region';
4447
}

0 commit comments

Comments
 (0)