{"id":17187624,"url":"https://github.com/thatguysam/facebook-live-embed-php","last_synced_at":"2025-09-05T02:10:18.955Z","repository":{"id":69755905,"uuid":"91125008","full_name":"ThatGuySam/facebook-live-embed-php","owner":"ThatGuySam","description":"Gets current or latest live stream from a Facebook page","archived":false,"fork":false,"pushed_at":"2023-06-06T02:35:45.000Z","size":132,"stargazers_count":22,"open_issues_count":4,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-20T00:40:23.690Z","etag":null,"topics":["embed","facebook","facebook-page","facebook-videos","livestream"],"latest_commit_sha":null,"homepage":null,"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/ThatGuySam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2017-05-12T19:51:34.000Z","updated_at":"2023-10-26T09:57:10.000Z","dependencies_parsed_at":"2023-07-12T07:30:45.412Z","dependency_job_id":null,"html_url":"https://github.com/ThatGuySam/facebook-live-embed-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ThatGuySam/facebook-live-embed-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatGuySam%2Ffacebook-live-embed-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatGuySam%2Ffacebook-live-embed-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatGuySam%2Ffacebook-live-embed-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatGuySam%2Ffacebook-live-embed-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThatGuySam","download_url":"https://codeload.github.com/ThatGuySam/facebook-live-embed-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatGuySam%2Ffacebook-live-embed-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266291710,"owners_count":23906316,"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":["embed","facebook","facebook-page","facebook-videos","livestream"],"created_at":"2024-10-15T01:06:52.928Z","updated_at":"2025-07-21T11:32:19.125Z","avatar_url":"https://github.com/ThatGuySam.png","language":"PHP","funding_links":["https://otechie.com/ThatGuySam?ref=badge"],"categories":[],"sub_categories":[],"readme":"# Facebook Live Embed\n\n## Introduction\n\n\u003e Gets current or latest live stream from a Facebook page\n\n[Here's a demo!](http://fblive.samcarlton.com/)\n\nBased on [youtube-live-embed](https://github.com/iacchus/youtube-live-embed)\n\n## Code Samples\n\n### Get Embed code\nThis generates the embed code for you with respect to width and height of the livestream(ie: Portrait live streams from phones)\n```php\n\u003cdiv class=\"embed-container\"\u003e\n    \u003c?= $FacebookLive-\u003eembedCode() ?\u003e\n\u003c/div\u003e\n```\n\n### Get Embed URL\nThis just get the embed url so you can use it more custom ways\n```php\n\u003ciframe src=\"\u003c?= $FacebookLive-\u003egetEmbedAddress() ?\u003e\" frameborder=\"0\" allowfullscreen\u003e\u003c/iframe\u003e\n```\n\n## Installation\n\n### 1. Install\n\n```sh\n$ git clone https://github.com/ThatGuySam/facebook-live-embed\n$ cd facebook-live-embed\n$ composer install\n```\n\n### 2. Configure\n- Go to https://developers.facebook.com/\n- Create a new app and get the App ID and the App Secret\n- Get the link for the page you want to pull live streams from\n- In the install folder rename config-sample.php to just config.php\n- Edit config.php and add your App ID, App Secret, and Facebook Page Link respectively\n\n\n### 3. Include PHP Class\n```php\nrequire_once __DIR__ . '/GetFacebookLiveStream.php';\n\n```\n\n### 4. Configure Live instance\n```php\n$FacebookLive = new GetFacebookLiveStream([\n  'facebook_page' =\u003e $fb_page,     // Facebook Page URL or ID\n  'app_id' =\u003e FB_APP_ID,           // Facebook App ID\n  'app_secret' =\u003e FB_APP_SECRET,   // Facebook App Secret\n  'cache_stream_for' =\u003e 60,        // How long to cache request for in seconds\n]);\n```\n\n### 5. Place in template\nThis generates the embed code for you with respect to width and height of the livestream(ie: Portrait live streams from phones)\n```php\n\u003cdiv class=\"embed-container\"\u003e\n    \u003c?= $FacebookLive-\u003eembedCode() ?\u003e\n\u003c/div\u003e\n```\n\n\n### 5.1 Alternative custom use in template (Bootstrap)\n```php\n\u003cdiv class=\"fb-live-embed embed-container\"\u003e\n\n  \u003cdiv class=\"embed-responsive embed-responsive-16by9 is-\u003c?= $FacebookLive-\u003eembed_orientation ?\u003e\" style=\"padding-top: \u003c?= $FacebookLive-\u003eembed_ratio_percent; ?\u003e\"  \u003e\n    \u003ciframe\n      src=\"\u003c?= $FacebookLive-\u003egetEmbedAddress() ?\u003e\"\n      scrolling=\"no\"\n      frameborder=\"0\"\n      webkitallowfullscreen=\"1\" mozallowfullscreen=\"1\" allowfullscreen=\"1\"\n      \u003e\u003c/iframe\u003e\n  \u003c/div\u003e\n\n\u003c/div\u003e\n```\n\n## Request Private Consulting on this project\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://otechie.com/ThatGuySam?ref=badge\"\u003e\u003cimg src=\"https://api.otechie.com/consultancy/ThatGuySam/badge.svg\" alt=\"Hire Sam Carlton\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatguysam%2Ffacebook-live-embed-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthatguysam%2Ffacebook-live-embed-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatguysam%2Ffacebook-live-embed-php/lists"}