我使用FacebookBusinessSDK11.0创建新产品类别电子商务
https://github.com/facebook/facebook-php-business-sdk
我试着看了文件,但还是看不懂。
try but show error(#100)参数requests是必需的
$api = Api::init($app_id, $app_secret, $access_token);
$api->setLogger(new CurlLogger());
$fields = array(
);
$params = array(
'retailer_id' => 'retailer-6',
"availability" => "in stock",
"brand" => "Nike",
"category" => "t-shirts",
"description" => "product description",
"image_url" => "http://www.images.example.com/t-shirts/1.png",
"name" => "product name",
"price" => "10.00",
"currency" => "USD",
"condition" => "new",
"url" => "http://www.images.example.com/t-shirts/1.png",
"retailer_product_group_id" => "product-group-1"
);
echo json_encode((new ProductCatalog($id))->createBatch(
$fields,
$params
)->exportAllData(), JSON_PRETTY_PRINT);
1条答案
按热度按时间sczxawaw1#