Skip to content

Commit

Permalink
v2.6 Breaking Changes
Browse files Browse the repository at this point in the history
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
  • Loading branch information
duliomatos committed Apr 12, 2016
1 parent ab7f880 commit 369cf39
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 273 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Facebook Ads API SDK for PHP

**IMPORTANT**: This is the legacy SDK. This will be deprecated when API v2.7 is released
Please start migrating to the autogenerated SDK which you can find [here](https://github.com/facebook/facebook-php-ads-sdk).


[![Packagist](https://img.shields.io/packagist/v/facebook/php-ads-sdk.svg?style=flat-square)](https://packagist.org/packages/facebook/php-ads-sdk)
[![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)
[![Travis](https://img.shields.io/travis/facebook/facebook-php-ads-sdk.svg?style=flat-square)](https://travis-ci.org/facebook/facebook-php-ads-sdk)
Expand Down
112 changes: 0 additions & 112 deletions examples/connectionobjects.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/FacebookAds/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Api {
/**
* @var string
*/
const VERSION = '2.5.1';
const VERSION = '2.6.0';

/**
* @var Api
Expand Down
11 changes: 0 additions & 11 deletions src/FacebookAds/Object/AdAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,6 @@ public function getBroadCategoryTargeting(
);
}

/**
* @param array $fields
* @param array $params
* @return Cursor
*/
public function getConnectionObjects(
array $fields = array(), array $params = array()) {
return $this->getManyByConnection(
ConnectionObject::className(), $fields, $params, 'connectionobjects');
}

/**
* @param array $fields
* @param array $params
Expand Down
39 changes: 0 additions & 39 deletions src/FacebookAds/Object/ConnectionObject.php

This file was deleted.

55 changes: 0 additions & 55 deletions src/FacebookAds/Object/Fields/ConnectionObjectFields.php

This file was deleted.

12 changes: 0 additions & 12 deletions src/FacebookAds/Object/Fields/InsightsFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class InsightsFields extends AbstractEnum {
const AD_NAME = 'ad_name';
const ADSET_ID = 'adset_id';
const ADSET_NAME = 'adset_name';
const AGE = 'age';
const APP_STORE_CLICKS = 'app_store_clicks';
const BUYING_TYPE = 'buying_type';
const CALL_TO_ACTION_CLICKS = 'call_to_action_clicks';
Expand All @@ -54,7 +53,6 @@ class InsightsFields extends AbstractEnum {
const COST_PER_TOTAL_ACTION = 'cost_per_total_action';
const COST_PER_UNIQUE_CLICK = 'cost_per_unique_click';
const COST_PER_UNIQUE_ACTION_TYPE = 'cost_per_unique_action_type';
const COUNTRY = 'country';
const CPM = 'cpm';
const CPP = 'cpp';
const CTR = 'ctr';
Expand All @@ -72,23 +70,13 @@ class InsightsFields extends AbstractEnum {
const ESTIMATED_AD_RECALL_RATE_UPPPER_BOUND
= 'estimated_ad_recall_rate_upper_bound';
const FREQUENCY = 'frequency';
const FREQUENCY_VALUE = 'frequency_value';
const GENDER = 'gender';
const HOURLY_STATS_AGGREGATED_BY_ADVERTISER_TIME_ZONE
= 'hourly_stats_aggregated_by_advertiser_time_zone';
const HOURLY_STATS_AGGREGATED_BY_AUDIENCE_TIME_ZONE
= 'hourly_stats_aggregated_by_audience_time_zone';
const IMPRESSIONS = 'impressions';
const IMPRESSION_DEVICE = 'impression_device';
const INLINE_LINK_CLICKS = 'inline_link_clicks';
const INLINE_POST_ENGAGEMENT = 'inline_post_engagement';
const NEWSFEED_AVG_POSITION = 'newsfeed_avg_position';
const NEWSFEED_CLICKS = 'newsfeed_clicks';
const NEWSFEED_IMPRESSIONS = 'newsfeed_impresions';
const PLACEMENT = 'placement';
const PRODUCT_ID = 'product_id';
const REACH = 'reach';
const REGION = 'region';
const RELEVANCE_SCORE = 'relevance_score';
const SOCIAL_CLICKS = 'social_clicks';
const SOCIAL_IMPRESSIONS = 'social_impressions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class TemplateDataFields extends AbstractEnum {

const CALL_TO_ACTION = 'call_to_action';
const DESCRIPTION = 'description';
const FORCE_SINGLE_LINK = 'force_single_link';
const LINK = 'link';
const MESSAGE = 'message';
const NAME = 'name';
const MAX_PRODUCT_COUNT = 'max_product_count';
const PICTURE = 'picture';
}
39 changes: 0 additions & 39 deletions src/FacebookAds/Object/Values/ConnectionObjectTypes.php

This file was deleted.

5 changes: 4 additions & 1 deletion src/FacebookAds/Object/Values/InsightsBreakdowns.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ class InsightsBreakdowns extends AbstractEnum {

const AGE = 'age';
const COUNTRY = 'country';
const FREQUENCY_VALUE = 'frequency_value';
const GENDER = 'gender';
const HOURLY_STATS_AGGREGATED_BY_ADVERTISER_TIME_ZONE =
'hourly_stats_aggregated_by_advertiser_time_zone';
const HOURLY_STATS_AGGREGATED_BY_AUDIENCE_TIME_ZONE =
'hourly_stats_aggregated_by_audience_time_zone';
const IMPRESSION_DEVICE = 'impression_device';
const PLACE_PAGE_ID = 'place_page_id';
const PLACEMENT = 'placement';
const PLACE_PAGE_ID = 'place_page_id';
const PRODUCT_ID = 'product_id';
const REGION = 'region';
}
1 change: 0 additions & 1 deletion test/FacebookAdsTest/Object/AdAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public function testCrud() {
$this->assertCanFetchConnection($account, 'getAdsPixels');
$this->assertCanFetchConnection($account, 'getAdVideos');
$this->assertCanFetchConnection($account, 'getBroadCategoryTargeting');
$this->assertCanFetchConnection($account, 'getConnectionObjects');
$this->assertCanFetchConnection($account, 'getCustomAudiences');
$this->assertCanFetchConnection($account, 'getConversionPixels');
$this->assertCanFetchConnection($account, 'getPartnerCategories');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ public function testDynamicProductAdsCreation() {
TemplateDataFields::LINK => 'http://www.example.com/',
TemplateDataFields::MESSAGE => 'Test DPA Ad Message',
TemplateDataFields::NAME => '{{product.name | titleize}}',
TemplateDataFields::MAX_PRODUCT_COUNT => 3,
TemplateDataFields::CALL_TO_ACTION => array(
'type' => CallToActionTypes::SHOP_NOW
),
Expand Down

0 comments on commit 369cf39

Please sign in to comment.