Skip to content

Commit 393152d

Browse files
satwikareddy3facebook-github-bot
authored andcommitted
Auto-generated php SDK code update
Summary: ignore-conflict-markers Reviewed By: liliarizona Differential Revision: D76757862 fbshipit-source-id: 0896bdd69b0495642fe2c7ef3b20cca07a9bba9c
1 parent 90edc69 commit 393152d

File tree

154 files changed

+3078
-933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+3078
-933
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/*
3+
* Copyright (c) Meta Platforms, Inc. and affiliates.
4+
* All rights reserved.
5+
*
6+
* This source code is licensed under the license found in the
7+
* LICENSE file in the root directory of this source tree.
8+
*/
9+
10+
require __DIR__ . '/vendor/autoload.php';
11+
12+
use FacebookAds\Api;
13+
use FacebookAds\Logger\CurlLogger;
14+
use FacebookAds\Object\ServerSide\ActionSource;
15+
use FacebookAds\Object\ServerSide\CustomData;
16+
use FacebookAds\Object\ServerSide\Event;
17+
use FacebookAds\Object\ServerSide\EventRequest;
18+
use FacebookAds\Object\ServerSide\UserData;
19+
20+
$access_token = '<ACCESS_TOKEN>';
21+
$pixel_id = '<ADS_PIXEL_ID>';
22+
23+
$api = Api::init(null, null, $access_token);
24+
$api->setLogger(new CurlLogger());
25+
26+
$user_data = (new UserData())
27+
->setEmails(array('[email protected]'))
28+
->setLeadId('525645896321548');
29+
30+
$custom_data = (new CustomData())
31+
->setCustomProperties(array('lead_event_source' => 'Salesforce');
32+
33+
$event = (new Event())
34+
->setEventName('QualifiedLead')
35+
->setEventTime(time())
36+
->setUserData($user_data)
37+
->setCustomData($custom_data)
38+
->setActionSource(ActionSource::SYSTEM_GENERATED);
39+
40+
$events = array();
41+
array_push($events, $event);
42+
43+
$request = (new EventRequest($pixel_id))
44+
->setEvents($events);
45+
$response = $request->execute();
46+
print_r($response);

src/FacebookAds/ApiConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace FacebookAds;
1111
class ApiConfig {
12-
const APIVersion = '22.0';
13-
const SDKVersion = '22.0.3';
12+
const APIVersion = '23.0';
13+
const SDKVersion = '23.0.0';
1414
const TYPE_CHECKER_STRICT_MODE = false;
1515
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/*
3+
* Copyright (c) Meta Platforms, Inc. and affiliates.
4+
* All rights reserved.
5+
*
6+
* This source code is licensed under the license found in the
7+
* LICENSE file in the root directory of this source tree.
8+
*/
9+
10+
namespace FacebookAds\Object;
11+
12+
use FacebookAds\ApiRequest;
13+
use FacebookAds\Cursor;
14+
use FacebookAds\Http\RequestInterface;
15+
use FacebookAds\TypeChecker;
16+
use FacebookAds\Object\Fields\AIGeneratedProductImageFields;
17+
18+
/**
19+
* This class is auto-generated.
20+
*
21+
* For any issues or feature requests related to this class, please let us know
22+
* on github and we'll fix in our codegen framework. We'll not be able to accept
23+
* pull request for this class.
24+
*
25+
*/
26+
27+
class AIGeneratedProductImage extends AbstractObject {
28+
29+
/**
30+
* @return AIGeneratedProductImageFields
31+
*/
32+
public static function getFieldsEnum() {
33+
return AIGeneratedProductImageFields::getInstance();
34+
}
35+
36+
protected static function getReferencedEnums() {
37+
$ref_enums = array();
38+
return $ref_enums;
39+
}
40+
41+
42+
}

src/FacebookAds/Object/Ad.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ public function createCopy(array $fields = array(), array $params = array(), $pe
182182

183183
$param_types = array(
184184
'adset_id' => 'string',
185+
'creative_parameters' => 'AdCreative',
185186
'rename_options' => 'Object',
186187
'status_option' => 'status_option_enum',
187188
);
@@ -220,6 +221,7 @@ public function getInsights(array $fields = array(), array $params = array(), $p
220221
'fields' => 'list<string>',
221222
'filtering' => 'list<Object>',
222223
'level' => 'level_enum',
224+
'limit' => 'int',
223225
'product_id_limit' => 'int',
224226
'sort' => 'list<string>',
225227
'summary' => 'list<string>',
@@ -271,6 +273,7 @@ public function getInsightsAsync(array $fields = array(), array $params = array(
271273
'fields' => 'list<string>',
272274
'filtering' => 'list<Object>',
273275
'level' => 'level_enum',
276+
'limit' => 'int',
274277
'product_id_limit' => 'int',
275278
'sort' => 'list<string>',
276279
'summary' => 'list<string>',

0 commit comments

Comments
 (0)