The most popular forked-PHP library for Twitter's OAuth REST API.
composer require swegio/twitteroauth
npm i sweg-twitteroauth
- Create a
config.phppage to store the Twitter OAuth credentials
config.php(or preferred filename)
- Use function
twitteroauth/src/TwitterOAuth.phpto immediately base64 encode and upload media from URL (as opposed to temporarily storing media)
See documentation at https://twitteroauth.com.
PHP versions listed as "active support" or "security fixes only" are supported.