{"id":18750669,"url":"https://github.com/webiny/twitteroauth","last_synced_at":"2025-08-02T01:36:15.891Z","repository":{"id":20229031,"uuid":"23500907","full_name":"webiny/TwitterOAuth","owner":"webiny","description":"[READ-ONLY] PHP component provides a wrapper for Twitter OAuth server. (master at Webiny/Framework)","archived":false,"fork":false,"pushed_at":"2017-11-26T21:25:40.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-20T11:09:04.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.webiny.com/","language":"PHP","has_issues":false,"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/webiny.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-30T21:18:24.000Z","updated_at":"2017-09-08T09:32:49.000Z","dependencies_parsed_at":"2022-08-21T03:40:13.526Z","dependency_job_id":null,"html_url":"https://github.com/webiny/TwitterOAuth","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/webiny/TwitterOAuth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FTwitterOAuth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FTwitterOAuth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FTwitterOAuth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FTwitterOAuth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webiny","download_url":"https://codeload.github.com/webiny/TwitterOAuth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FTwitterOAuth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266578680,"owners_count":23951150,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2024-11-07T17:12:44.462Z","updated_at":"2025-07-22T21:34:18.067Z","avatar_url":"https://github.com/webiny.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"TwitterOAuth\n============\n\nThis component provides is a wrapper for Twitter OAuth server.\n\nInstall the component\n---------------------\nThe best way to install the component is using Composer.\n\n```bash\ncomposer require webiny/twitter-oauth\n```\nFor additional versions of the package, visit the [Packagist page](https://packagist.org/packages/webiny/twitter-oauth).\n\n## Configuring the component\n\nTo use the component, you first need to configure it.\nThe configuration is done by defining the following params:\n\n- **ClientId** - Twitter client id\n- **ClientSecret** - Twitter client secret\n- **RedirectUri** - location where the user will be redirected by the OAuth server, once he is authorized\n\n### Example configuration:\n\n```yaml\n    TwitterOAuth:\n        MyTwitterApp:\n            ClientOd: AJmIXgXfaasdasaULBmnygIiGA\n            ClientSecret: JE5dpb0a891ciisasdMOu7ELF9SI0TazR3hDAirft0Y\n            RedirectUri: /security/login-tw/\n        Bridge: \\Webiny\\Component\\TwitterOAuth\\Bridge\\TwitterOAuth\\TwitterOAuth\n```\n\n\n### Dependency\n\nThe library requires `abraham/twitteroauth` TwitterOAuth component. The will be installed automatically if you install\nTwitterOAuth Webiny component using composer, however, you will need to include this file somewhere in your application\nbefore you can use the component `/path/to/abraham/twitteroauth/twitteroauth.php`.\n\n## Usage\n\nOnce you have configured the component, its usage is fairly simple if you have an access token. If you don't have an access token, the best way to get one, is to authenticate the user using the `Security` component with TwitterOAuth as auth provider.\n\n```php\n$tw = TwitterOAuthLoader::getInstance('MyTwitterApp');\n\n$tw-\u003esetAccessToken(...);\n\n// get user details for current access token\n$user = $tw-\u003egetUserDetails(); // returns TwitterOAuthUser object\n\n// perform any other API operation\n$tw-\u003eget($url, $params);\n$tw-\u003epost($url, $params);\n$tw-\u003edelete($url, $params);\n```\n\nResources\n---------\n\nTo run unit tests, you need to use the following command:\n\n    $ cd path/to/Webiny/Component/TwitterOAuth/\n    $ composer.phar install\n    $ phpunit","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebiny%2Ftwitteroauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebiny%2Ftwitteroauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebiny%2Ftwitteroauth/lists"}