{"repo":"atymic/twitter","free":true,"listed":false,"github":"https://github.com/atymic/twitter","clone":"git clone https://github.com/atymic/twitter.git","description":"Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x","language":"PHP","stars":951,"topics":["twitter","twitter-api","php","tweets","laravel","laravel6","laravel-package","twitch-api","twitter-bot","api-client"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"X (formerly Twitter) for PHP Twitter API for Laravel 10.x, 11.x (and new versions as they are released). Also supports other frameworks via PHP-DI (or feel free to add support for your framework via PR) You need to create an application and create your access token in the Application Management. Installation Laravel Configuration Just set the below environment variables in your .env . Advanced Laravel configuration Run php artisan vendor:publish --provider=\"Atymic\\Twitter\\ServiceProvider\\LaravelServiceProvider\" Versions 3.x 3.x is the current major version, and is not backward compatible with 2.x. See the migration guide in UPGRADE.md. 2.x 2.x is not longer maintained. We are not accepting bug fixes, please upgrade to 3.x Usage Output format You can choose between three different output formats. By default, API v1 responses will be returned as objects while API v2 responses will be returned as JSON. To change this, use the response format option in the parameters you pass to any method. X (formerly Twitter) API Versions To set the default twitter API version to v2 instead of the default v1.1 , set the TWITTER API VERSION to 2 in your .env . If you have set the v1.1 api as the default, you can use use Twitter::forApiV2() to get an instance of the v2 client. The same goes for getting a v1 instance from a v2 client, using Twitter::forApiV1() . It is safe to call Twitter::forApiV1() on either a v1 or v2 client instance. Functions X (formerly Twitter) API v1.1 Account getSettings(","default_branch":null,"files":null,"tree":[],"storefront":"/r/atymic","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/atymic/twitter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}