{"id":18578339,"url":"https://github.com/astrotomic/php-open-graph","last_synced_at":"2025-07-04T23:37:34.818Z","repository":{"id":52291874,"uuid":"82821437","full_name":"Astrotomic/php-open-graph","owner":"Astrotomic","description":"This package provides a fluent PHP OOP builder for Open Graph protocol.","archived":false,"fork":false,"pushed_at":"2024-10-22T20:28:51.000Z","size":209,"stargazers_count":59,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-29T21:06:02.421Z","etag":null,"topics":["hacktoberfest","open-graph","open-graph-protocol","php-open-graph","treeware","twitter"],"latest_commit_sha":null,"homepage":"https://ogp.me/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Astrotomic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Gummibeer","SarahSibert"],"issuehunt":"astrotomic","custom":["https://forest.astrotomic.info"]}},"created_at":"2017-02-22T15:38:09.000Z","updated_at":"2023-10-11T03:04:18.000Z","dependencies_parsed_at":"2024-11-06T23:38:30.254Z","dependency_job_id":"ae67ea8e-be5c-4c96-aa8e-e4591aac2235","html_url":"https://github.com/Astrotomic/php-open-graph","commit_stats":{"total_commits":182,"total_committers":14,"mean_commits":13.0,"dds":"0.42307692307692313","last_synced_commit":"99b075dffd07512425b5a7cb7f61cc97ab1cf12f"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-open-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-open-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-open-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-open-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrotomic","download_url":"https://codeload.github.com/Astrotomic/php-open-graph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182399,"owners_count":20897381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","open-graph","open-graph-protocol","php-open-graph","treeware","twitter"],"created_at":"2024-11-06T23:34:48.803Z","updated_at":"2025-04-04T13:10:39.783Z","avatar_url":"https://github.com/Astrotomic.png","language":"PHP","funding_links":["https://github.com/sponsors/Gummibeer","https://github.com/sponsors/SarahSibert","https://issuehunt.io/r/astrotomic","https://forest.astrotomic.info"],"categories":[],"sub_categories":[],"readme":"# PHP Open-Graph\n\n[![Latest Version](http://img.shields.io/packagist/v/astrotomic/php-open-graph.svg?label=Release\u0026style=for-the-badge)](https://packagist.org/packages/astrotomic/php-open-graph)\n[![MIT License](https://img.shields.io/github/license/Astrotomic/php-open-graph.svg?label=License\u0026color=blue\u0026style=for-the-badge)](https://github.com/Astrotomic/php-open-graph/blob/master/LICENSE)\n[![Offset Earth](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-green?style=for-the-badge)](https://plant.treeware.earth/Astrotomic/php-open-graph)\n[![Larabelles](https://img.shields.io/badge/Larabelles-%F0%9F%A6%84-lightpink?style=for-the-badge)](https://www.larabelles.com/)\n\n[![pest](https://img.shields.io/github/workflow/status/Astrotomic/php-open-graph/pest?style=flat-square\u0026logoColor=white\u0026logo=github\u0026label=Tests)](https://github.com/Astrotomic/php-open-graph/actions?query=workflow%3Apest)\n[![pint](https://img.shields.io/github/workflow/status/Astrotomic/php-open-graph/pint?style=flat-square\u0026logoColor=white\u0026logo=github\u0026label=CS)](https://github.com/Astrotomic/php-open-graph/actions?query=workflow%3Apint)\n[![Total Downloads](https://img.shields.io/packagist/dt/astrotomic/php-open-graph.svg?label=Downloads\u0026style=flat-square)](https://packagist.org/packages/astrotomic/php-open-graph)\n\nThis package provides a fluent PHP OOP builder for [Open Graph protocol](https://ogp.me) and [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards).\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require astrotomic/php-open-graph\n```\n\n## Usage\n\n```php\nuse Astrotomic\\OpenGraph\\OpenGraph;\nuse Astrotomic\\OpenGraph\\StructuredProperties\\Image;\n\necho OpenGraph::website('Example')\n    -\u003eurl('https://example.com')\n    -\u003eimage('https://example.com/image1.jpg')\n    -\u003eimage(Image::make('https://example.com/image2.jpg')-\u003ewidth(600));\n```\n\n```html\n\u003cmeta property=\"og:type\" content=\"website\" /\u003e\n\u003cmeta property=\"og:title\" content=\"Example\" /\u003e\n\u003cmeta property=\"og:url\" content=\"https://example.com\" /\u003e\n\u003cmeta property=\"og:image\" content=\"https://example.com/image1.jpg\" /\u003e\n\u003cmeta property=\"og:image:url\" content=\"https://example.com/image2.jpg\" /\u003e\n\u003cmeta property=\"og:image:width\" content=\"600\" /\u003e\n```\n\n### Types\n\n#### Global\n\n-   `\\Astrotomic\\OpenGraph\\Types\\Article`\n-   `\\Astrotomic\\OpenGraph\\Types\\Book`\n-   `\\Astrotomic\\OpenGraph\\Types\\Profile`\n-   `\\Astrotomic\\OpenGraph\\Types\\Website`\n\n#### Music\n\n-   `\\Astrotomic\\OpenGraph\\Types\\Music\\Album`\n-   `\\Astrotomic\\OpenGraph\\Types\\Music\\Playlist`\n-   `\\Astrotomic\\OpenGraph\\Types\\Music\\RadioStation`\n-   `\\Astrotomic\\OpenGraph\\Types\\Music\\Song`\n\n#### Video\n\n-   `\\Astrotomic\\OpenGraph\\Types\\Video\\Episode`\n-   `\\Astrotomic\\OpenGraph\\Types\\Video\\Movie`\n-   `\\Astrotomic\\OpenGraph\\Types\\Video\\Other`\n-   `\\Astrotomic\\OpenGraph\\Types\\Video\\TvShow`\n\n#### Twitter\n\n-   `\\Astrotomic\\OpenGraph\\Types\\Twitter\\App`\n-   `\\Astrotomic\\OpenGraph\\Types\\Twitter\\Player`\n-   `\\Astrotomic\\OpenGraph\\Types\\Twitter\\SummaryLargeImage`\n-   `\\Astrotomic\\OpenGraph\\Types\\Twitter\\Summary`\n\n### Structured Properties\n\n-   `\\Astrotomic\\OpenGraph\\StructuredProperties\\Audio`\n-   `\\Astrotomic\\OpenGraph\\StructuredProperties\\Image`\n-   `\\Astrotomic\\OpenGraph\\StructuredProperties\\Video`\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).\n\n### Security\n\nIf you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it.\n\n## Credits\n\n-   [Tom Witkowski](https://github.com/Gummibeer)\n-   [Alex Vanderbist](https://github.com/AlexVanderbist)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Treeware\n\nYou're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.\n\nIt’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.\n\nYou can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/php-open-graph)\n\nRead more about Treeware at [treeware.earth](https://treeware.earth)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrotomic%2Fphp-open-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrotomic%2Fphp-open-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrotomic%2Fphp-open-graph/lists"}