PHP code example of abdellahramadan / open-graph-bundle
1. Go to this page and download the library: Download abdellahramadan/open-graph-bundle 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/ */
abdellahramadan / open-graph-bundle example snippets
class HomeController extends AbstractController
{
public function index(OpenGraphInterface $openGraph): Response
{
$openGraph
->setTitle('My website')
->setDescription('Some descriptions ...')
->setSiteName('My Blog')
;
...
return $this-render('index.html.twig');
}
}