This is a library that provides API for creating posts on Facebook and Twitter. It was cloned from this repo and refactored to support PHP 8.1+
Recommended way is through Composer
composer require janwebdev/social-post
Facebook doesn't support non-expiring user access tokens. Instead, you can obtain a permanent page access token. When using such tokens you can act and post as the page itself. More information about the page access tokens from the official Facebook documentation. Some Stackoverflow answers (here and here) also may help.
This package is licensed under the MIT License.