PHP code example of wshafer / opengraph

1. Go to this page and download the library: Download wshafer/opengraph 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/ */

    

wshafer / opengraph example snippets


<?= $this->openGraph(); 

return [
    'openGraph' => [
        'defaults' => [
    
            'facebook' => [
                'appId' => '1234',
            ],
    
            'general' => [
                'ogType' => 'website',
            ],
    
            'website' => [
                'title' => 'No Title',
                'image' => 'https://upload.wikimedia.org/wikipedia/commons/4/4b/Blank_License_Plate_Shape.jpg',
                'description' => '',
                'siteName' => '',
            ],
    
            'article' => [
                'title' => 'No Title',
                'image' => 'https://upload.wikimedia.org/wikipedia/commons/4/4b/Blank_License_Plate_Shape.jpg',
                'description' => '',
                'siteName' => '',
                'author' => '',
                'section' => ''
            ],
        ],
    ],
];
bash
$ php pubic/index.php orm:schema-tool:update --dump-sql