PHP code example of donmbelembe / laravel-facebook-catalog
1. Go to this page and download the library: Download donmbelembe/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/ */
donmbelembe / laravel-facebook-catalog example snippets
use Donmbelembe\LaravelFacebookCatalog\LaravelFacebookCatalog;
LaravelFacebookCatalog::setTitle('Example feed');
LaravelFacebookCatalog::setDescription('Example feed of the Example shop');
LaravelFacebookCatalog::setLink('https://example.shop');
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' => 'new',
"price" => 99.99,
'brand' => 'Foo brand',
'condition' => 'new',
]);
return LaravelFacebookCatalog::display();