PHPackages                             budry/php-open-graph - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. budry/php-open-graph

ActiveLibray[Utility &amp; Helpers](/categories/utility)

budry/php-open-graph
====================

Simple object based Open Graph generator

v1.0.0(4y ago)089MITPHPPHP ^7.1|^8.0

Since Apr 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Budry/php-open-graph)[ Packagist](https://packagist.org/packages/budry/php-open-graph)[ RSS](/packages/budry-php-open-graph/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

PHP The Open Graph protocol
===========================

[](#php-the-open-graph-protocol)

Simple object generator for open graph protocol. Full implementation of [this specification](https://ogp.me/)

Installation
------------

[](#installation)

The best way to install `budry/php-open-grap` is using [Composer](https://getcomposer.org/)

```
$ composer require budry/php-open-grap
```

How to use
----------

[](#how-to-use)

Create open graph instance and configure

```
$image = new \Budry\OpenGraph\Objects\Image("https://example.com/image.jpg");
$openGraph = new \Budry\OpenGraph\OpenGraph("Page title", "Page URL", $image);

$article = new \Budry\OpenGraph\Types\Article();
$article->setExpirationDate(new DateTimeImmutable("2022-03-12 12:23:24"))
    ->setModifiedDate(new DateTimeImmutable())
    ->setPublishedDate(new DateTimeImmutable())
    ->setSection("SCI-FI")
$openGraph->setType($article);

foreach ($openGraph->getFields() as $field) {
    echo ''
}
```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1542d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c0840abca14f130b93d02cfa8412e99dc0645ca3f7e57cf75cfcb487efe33aa?d=identicon)[Budry](/maintainers/Budry)

---

Top Contributors

[![Budry](https://avatars.githubusercontent.com/u/990676?v=4)](https://github.com/Budry "Budry (16 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/budry-php-open-graph/health.svg)

```
[![Health](https://phpackages.com/badges/budry-php-open-graph/health.svg)](https://phpackages.com/packages/budry-php-open-graph)
```

###  Alternatives

[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
