PHP code example of meeeet-dev / laravel-facebook-catalog
1. Go to this page and download the library: Download meeeet-dev/laravel-facebook-catalog library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
meeeet-dev / laravel-facebook-catalog example snippets
use MeeeetDev\LaravelFacebookCatalog\LaravelFacebookCatalog;
LaravelFacebookCatalog::setTitle('Example feed');
LaravelFacebookCatalog::setDescription('Example feed of the Example shop');
LaravelFacebookCatalog::setLink('https://example.shop');
LaravelFacebookCatalog::setCurrency('USD');
LaravelFacebookCatalog::addItem([
'link' => 'https://example.shop/p/foo-bar',
'id' => 'SKU123',
'title' => 'Foo bar',
'image_link' => 'https://example.shop/images/foo-bar.png',
'description' => 'Foo bar best product',
'availability' => 'in stock',
"price" => 99.99,
'brand' => 'Foo brand',
'condition' => 'new',
]);
return LaravelFacebookCatalog::display();
[
"id" => "", // Unique Example SKU
"title" => "", // Max 200 Characters, recommend 65 maximum
"description" => "",
"rich_text_description" => "", // A description of the item containing rich text (HTML) formatting
"availability" => "in stock", // values: in stock, out of stock
"condition" => "new", // values: new, refurbished, used
"price" => 0.00,
"link" => "",
"image_link" => "",
"brand" => "",
// ll,
"sale_price_effective_date" => null,
"item_group_id" => null,
"status" => null, // Values: active, archived (or staging)
"additional_image_link" => null, // separated by a comma (,), semicolon (;), space ( ) or vertical bar (|)
"gender" => null, // female, male, unisex
"color" => null, // The main colour of the item. Describe the colour in words, not a hex code. Character limit: 200.
"age_group" => null, // Values: adult, all ages, teen, kids, toddler, infant, newborn.
"material" => null, // The material the item is made from, such as cotton, polyester, denim or leather
"pattern" => null, // The pattern or graphic print on the item
"shipping" => null,
"shipping_weight" => null,
]
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.