Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.19 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.19 KB

OpenGraph

OpenGraph is a helper class for generating Open Graph meta tags.

License: Beerware Version CircleCI

Documentation

Installation

Use the package manager Composer to install OpenGraph.

composer require apility/opengraph

Usage

use Apility\OpenGraph\OpenGraph;

$og = new OpenGraph;
$og->addProperty('title', 'Hello World');
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <?php print($og->toMetaTags()); ?>
  <title>Document</title>
</head>
<body>
  <h1>Hello World</h1>
</body>
</html>