{"id":21771726,"url":"https://github.com/naffiq/yii2-twitter-api","last_synced_at":"2026-05-03T23:36:49.350Z","repository":{"id":57023245,"uuid":"86697976","full_name":"naffiq/yii2-twitter-api","owner":"naffiq","description":"Yii2 component wrapper for J7mbo/twitter-api-php","archived":false,"fork":false,"pushed_at":"2020-03-18T07:09:36.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-26T07:56:32.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naffiq.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}},"created_at":"2017-03-30T12:04:34.000Z","updated_at":"2020-03-18T07:09:38.000Z","dependencies_parsed_at":"2022-08-23T13:50:58.579Z","dependency_job_id":null,"html_url":"https://github.com/naffiq/yii2-twitter-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/naffiq/yii2-twitter-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-twitter-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-twitter-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-twitter-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-twitter-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naffiq","download_url":"https://codeload.github.com/naffiq/yii2-twitter-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naffiq%2Fyii2-twitter-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32589262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-26T14:18:15.099Z","updated_at":"2026-05-03T23:36:49.336Z","avatar_url":"https://github.com/naffiq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yii2 Twitter API\n\n[![Test Coverage](https://codeclimate.com/github/naffiq/yii2-twitter-api/badges/coverage.svg)](https://codeclimate.com/github/naffiq/yii2-twitter-api/coverage)\n[![Code Climate](https://codeclimate.com/github/naffiq/yii2-twitter-api/badges/gpa.svg)](https://codeclimate.com/github/naffiq/yii2-twitter-api)\n[![Build Status](https://travis-ci.org/naffiq/yii2-twitter-api.svg?branch=master)](https://travis-ci.org/naffiq/yii2-twitter-api)\n\nThis package provides component wrapper for [J7mbo/twitter-api-php](https://github.com/J7mbo/twitter-api-php) library.\nBasically it just helps you to move settings to your app config.\n\n## Installation\n\nThe preferred way to install this package is through [composer](https://getcomposer.org/):\n```bash\n$ composer require naffiq/yii2-twitter-api\n```\n\n## Configuration\n\nAdd following code to your components config section:\n```php\n\u003c?php\nreturn [\n    // Your app settings ...\n    'components' =\u003e [\n        // Other components ...\n        'twitter' =\u003e [\n            'class' =\u003e 'naffiq\\twitterapi\\TwitterAPI',\n            'oauthAccessToken' =\u003e 'YOUR_OAUTH_ACCESS_TOKEN',\n            'oauthAccessTokenSecret' =\u003e 'YOUR_OAUTH_ACCESS_TOKEN',\n            'consumerKey' =\u003e 'YOUR_CONSUMER_KEY',\n            'consumerSecret' =\u003e 'YOUR_CONSUMER_SECRET'\n        ]        \n    ]\n    // ...\n];\n```\n\nAnd we are ready to roll\n\n## Usage\n\nOnce you set up the component, you can use all of the [J7mbo/twitter-api-php](https://github.com/J7mbo/twitter-api-php)\nlibrary's methods, just like this:\n```php\n\u003c?php\n\n/**\n * @var \\naffiq\\twitterapi\\TwitterAPI $twitter\n */\n$twitter = \\Yii::$app-\u003eget('twitter');\n\n$url = 'https://api.twitter.com/1.1/blocks/create.json';\n$requestMethod = 'POST';\n$postFields = [\n    'screen_name' =\u003e 'usernameToBlock', \n    'skip_status' =\u003e '1'\n];\n\n$twitter-\u003ebuildOauth($url, $requestMethod)\n    -\u003esetPostfields($postFields)\n    -\u003eperformRequest();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaffiq%2Fyii2-twitter-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaffiq%2Fyii2-twitter-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaffiq%2Fyii2-twitter-api/lists"}