{"id":17398917,"url":"https://github.com/noweh/laravel-twitter","last_synced_at":"2025-04-16T02:22:39.326Z","repository":{"id":57028812,"uuid":"436001308","full_name":"noweh/laravel-twitter","owner":"noweh","description":"Laravel Wrapper for Twitter API V2.","archived":false,"fork":false,"pushed_at":"2023-02-17T21:11:37.000Z","size":5,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T04:11:15.601Z","etag":null,"topics":["api","laravel","php","twitter","twitter-api"],"latest_commit_sha":null,"homepage":"","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/noweh.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-07T19:23:56.000Z","updated_at":"2024-12-22T01:50:02.000Z","dependencies_parsed_at":"2024-10-19T06:26:18.394Z","dependency_job_id":null,"html_url":"https://github.com/noweh/laravel-twitter","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"656d0e2ec97ce151b44b55fab1939bd70d4fbaa9"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-twitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-twitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-twitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-twitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noweh","download_url":"https://codeload.github.com/noweh/laravel-twitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183829,"owners_count":21226267,"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":["api","laravel","php","twitter","twitter-api"],"created_at":"2024-10-16T15:03:02.869Z","updated_at":"2025-04-16T02:22:39.306Z","avatar_url":"https://github.com/noweh.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter API V2 for Laravel\n\n![Laravel](https://img.shields.io/badge/Laravel-v6/7/8-828cb7.svg?style=flat-square\u0026logo=Laravel\u0026color=FF2D20)\n![PHP](https://img.shields.io/badge/PHP-v7.4-828cb7.svg?style=flat-square)\n[![Badge Twitter](https://img.shields.io/badge/Twitter%20API-v2-828cb7.svg?style=flat-square\u0026logo=twitter\u0026color=1DA1F2)](https://developer.twitter.com/en/docs/twitter-api)\n[![last version](https://img.shields.io/packagist/v/noweh/laravel-twitter)](https://packagist.org/packages/noweh/laravel-twitter)\n[![Run Tests](https://github.com/noweh/twitter-api-v2-php/actions/workflows/run-tests.yml/badge.svg)](https://github.com/noweh/twitter-api-v2-php/actions/workflows/run-tests.yml)\n[![MIT Licensed](https://img.shields.io/github/license/noweh/laravel-twitter)](licence.md)\n\nA Laravel Wrapper for the Twitter REST API V2 endpoints.\n\nThis package is an extension of [noweh/twitter-api-v2-php](https://github.com/noweh/twitter-api-v2-php), for a simplified integration in Laravel with the Facades.\n\n## Installation\nFirst you need to add the component to your composer.json\n```\ncomposer require noweh/laravel-twitter\n```\nUpdate your packages with *composer update* or install with *composer install*.\n\nLaravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.\n\n### Laravel without auto-discovery\n\n    Noweh\\Twitter\\TwitterServiceProvider::class,\n\nTo use the facade, add this in app.php:\n\n    'Twitter' =\u003e Noweh\\Twitter\\TwitterFacade::class,\n\n### Service Provider\nAfter updating composer, add the ServiceProvider to the providers array in config/app.php\n\n## Configuration file\n\nNext, you must migrate config :\n\n    php artisan vendor:publish --provider=\"Noweh\\Twitter\\TwitterServiceProvider\"\n\nAnd add your settings in the new file created in `config/twitter.php`.\n\n### To search specific tweets\n\nExample:\n\n    use Twitter;\n\n    $return = Twitter::tweetSearch()\n        -\u003eshowMetrics()\n        -\u003eaddFilterOnLocales(['fr', 'en'])\n        -\u003eaddFilterOnKeywordOrPhrase(['avengers', 'assemble'], \\Noweh\\TwitterApi\\Client::OPERATORS['AND'])\n        -\u003eshowUserDetails()\n        -\u003eperformRequest()\n    ;\n\n### To find Twitter Users\n`findByIdOrUsername()` expects either an array, or a string.\n\nYou can specify the search mode as a second parameter (`\\Noweh\\TwitterApi\\Client::MODES['USERNAME']` OR `\\Noweh\\TwitterApi\\Client::MODES['ID']`)\n\nExample:\n\n    use Twitter;\n    \n    $return = Twitter::userSearch()\n        -\u003efindByIdOrUsername('twitterdev', \\Noweh\\TwitterApi\\Client::MODES['USERNAME'])\n        -\u003eperformRequest()\n    ;\n\n### To Post a new Tweet\n\nExample:\n\n    use Twitter;\n\n    $return = Twitter::tweet()-\u003eperformRequest('POST', ['text' =\u003e 'This is a test....']);\n\n### To Retweet\n\nExample:\n\n    $return = Twitter::retweet()-\u003eperformRequest('POST', ['tweet_id' =\u003e $tweet-\u003eid]);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoweh%2Flaravel-twitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoweh%2Flaravel-twitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoweh%2Flaravel-twitter/lists"}