{"id":22487838,"url":"https://github.com/JamesTheHacker/Facebook-Live-Reactions","last_synced_at":"2025-08-02T20:31:41.375Z","repository":{"id":143948944,"uuid":"74274087","full_name":"JamesTheHacker/Facebook-Live-Reactions","owner":"JamesTheHacker","description":"The easiest way to create interactive Facebook live streams. Displays reaction count and live shoutouts :)","archived":false,"fork":false,"pushed_at":"2016-11-29T12:03:26.000Z","size":1830,"stargazers_count":292,"open_issues_count":2,"forks_count":94,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-12-06T17:18:09.908Z","etag":null,"topics":["audio","facebook","facebook-live-reactions","facebook-live-streams","php","reaction-counts","reactions","shoutout","stream","video"],"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/JamesTheHacker.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}},"created_at":"2016-11-20T12:57:17.000Z","updated_at":"2024-11-10T13:45:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"780a8b15-8cb6-4867-aaf0-cde927df3c43","html_url":"https://github.com/JamesTheHacker/Facebook-Live-Reactions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JamesTheHacker/Facebook-Live-Reactions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesTheHacker%2FFacebook-Live-Reactions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesTheHacker%2FFacebook-Live-Reactions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesTheHacker%2FFacebook-Live-Reactions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesTheHacker%2FFacebook-Live-Reactions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesTheHacker","download_url":"https://codeload.github.com/JamesTheHacker/Facebook-Live-Reactions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesTheHacker%2FFacebook-Live-Reactions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268448362,"owners_count":24252019,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["audio","facebook","facebook-live-reactions","facebook-live-streams","php","reaction-counts","reactions","shoutout","stream","video"],"created_at":"2024-12-06T17:17:18.092Z","updated_at":"2025-08-02T20:31:41.345Z","avatar_url":"https://github.com/JamesTheHacker.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"Facebook Live Reactions\n=======================\n\nFacebook Live Reactions is a Linux script for creating Facebook Live Streams that contains interactive reaction counts. It also includes an interactive shoutout feature that gives live shoutouts to users who typed \"shared\" into the comment box.\n\nLike this ...\n\n![Facebook Live Reactions](http://i.imgur.com/Rm5JEOG.png)\n\nDependencies\n------------\n\n* Linux or OSX\n* PHP (Built with 7, should work with 5.6)\n* PHP GD or ImageMagik\n* FFMPEG (must be compiled with aac and rtmp)\n* Photoshop (if you plan to modify the image)\n\nInstalling\n----------\n\nIt's best to install the script on a server. [Get $10 free from Digital Ocean!](https://m.do.co/c/dde4646baa31)\n\nClone the repo:\n\n    git clone http://github.com/JamesTheHacker/facebook-live-reactions\n    cd facebook-live-reactions\n\nInstall PHP dependencies ([Composer](https://getcomposer.org/) must be installed):\n\n    composer install\n\nConfiguration\n-------------\n\nA few things need to be configured to make Facebook Live Reactions work.\n\n**Adding an audio file**\n\nFacebook Live requires an audio stream. I haven't included any audio with the repo as it would increase the size. The audio file must be at least 4 hours in length (Facebook Live streams can only last 4 hours). If the audio file is shorter then this the live stream will stop when the audio ends.\n\nDownload an audio stream from YouTube using [youtube-dl](https://github.com/rg3/youtube-dl):\n\n    youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=15uF7r2rCQk\n\nRename the download to `audio.mp3`\n\n    mv \"Vintage Christmas Songs from the 20's \u0026 30's Playlist-15uF7r2rCQk.mp3\" audio.mp3\n\nThis will download the `.mp3` of the video. In this case it's a playlist of classic 1920's and 1930's Christmas songs.\n\nThe audio file above is 20 minutes long. It needs to be looped so it's at least 4 hours in length. Lets use [SoX](http://sox.sourceforge.net/) to loop the audio file.\n\n    sox audio.mp3 audio-loop.mp3 repeat 15\n\nThis will take a while to run. Once complete a single `audio-loop.mp3` file will be produced. Copy `audio-loop.mp3` to the `data` directory.\n\n**Edit Settings**\n\nBefore modifying the settings you need to create a Facebook application. If you don't already have one [create one here](https://developers.facebook.com/apps/). The application is used to connect to the Graph API to fetch the reactions and comments from the video. When setting up the application you only need to provide basic information.\n\nAll settings are stored in the `settings.php` file. To get things working you only need to modify the settings below:\n\n    'POST_ID'       =\u003e '',\n    'ACCESS_TOKEN'  =\u003e '',\n    'APP_ID'        =\u003e '',\n    'APP_SECRET'    =\u003e ''\n\nOnce you've got your app setup get the apps access token using the [Access Token Tool](https://developers.facebook.com/tools/accesstoken/). Copy the access token into the settings. Also copy the app ID and app secret.\n\nIgnore `POST_ID` for the moment. We'll move onto that.\n\nCreate The Live Stream\n-----------------------\n\nAfter you've modified the settings next you need to create a new live stream on Facebook. Go to a page you own, press the \"Publishing Tools\" tab, and then click \"Videos\". Press the \"Live\" button and wait for the popup to load.\n\nNext you should see \"Server or stream URL\". Copy this URL and paste it to the bottom of `fblive.sh`. Paste it between the `\"...\"` (keeping the quotes!). Like this:\n\n    ffmpeg \\\n    -re -y \\\n    -loop 1 \\\n    -f image2 \\\n    -i images/stream.jpg \\\n    -i data/audio-loop.mp3 \\\n    -acodec libfdk_aac \\\n    -ac 1 \\\n    -ar 44100 \\\n    -b:a 128k \\\n    -vcodec libx264 \\\n    -pix_fmt yuv420p \\\n    -vf scale=640:480 \\\n    -r 30 \\\n    -g 60 \\\n    -f flv \\\n    \"rtmp://rtmp-api.facebook.com:80/rtmp/1343774358979842?ds=1\u0026s_l=1\u0026a=AaaWtwcn05wdmMCp\"\n\nOpen a new terminal, navigate to the root directory and run (you may need to run `chmod +x fblive.sh`:\n\n    ./fblive.sh\n\nThis will start streaming. Press the \"next\" button and wait for Facebook to acknowledge the live stream.\n\nBy default a blank image will be streamed. You won't see the reactions or shoutouts just yet. This is because we haven't yet started the other script to update the image. We'll move onto that now.\n\nOnce the stream loads in preview press \"Go Live\". Another box should pop up that contains video stats. On this page there is a \"view permalink\" link. Click that and you will be navigated to the Facebook post that contains the live stream.\n\nIn the URL there's a unique ID that conists of a bunch of numbers. Grab this ID and paste it into `settings.php`. Like so:\n\n    'POST_ID' =\u003e '90823402348502302894',\n\nNearly done!\n\nUpdating Reactions and Shoutouts\n--------------------------------\n\nOpen another terminal, navigate to the root directory and run the following command:\n\n    php fblive.php\n\nThis will run silently. Do not quit the process! Every 5 seconds it will grab the reactions count and update the live stream. It will also grab the latest comment that contains the word \"share\" and give a random shoutout to that user.\n\nAll done. Your stream should now be live. Leave a reaction, or type the word \"shared\" into the comment and wait for the video to update.\n\nFAQ\n---\n\n**How do I modify the image?**\n\nI've include the `.psd` file in `images/background.psd`. Open this file and change the text, or background image. **DO NOT MOVE THE REACTIONS IMAGES!** Always save the image as `images/background.jpg`\n\n**What if I want to move the reactions images?**\n\nIf you move the reactions images you also need to update the `XPOS` and `YPOS` for each reaction in `settings.php`. This is because the script uses these values to draw the reaction counts in the correct place.\n\n**What is the stream.jpg file?**\n\nDo not touch this file. The PHP script will modify this file to include the updated stats and shoutouts. This file is passed directly to `ffmpeg` and is used to generate the live stream.\n\n**How do I add my own shoutout messages?**\n\nTo edit the shoutouts modify the `shoutouts.php` file. Keep them short, otherwise they will not render correctly on the live stream.\n\nContributions\n-------------\n\nIf the documentation is unclear, or you have any issues please file a new issue. If you want to contribute submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJamesTheHacker%2FFacebook-Live-Reactions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJamesTheHacker%2FFacebook-Live-Reactions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJamesTheHacker%2FFacebook-Live-Reactions/lists"}