{"id":13794869,"url":"https://github.com/capacitor-community/twitter","last_synced_at":"2025-05-12T21:32:31.900Z","repository":{"id":46674657,"uuid":"166874689","full_name":"capacitor-community/twitter","owner":"capacitor-community","description":"Capacitor plugin to enable TwitterKit","archived":true,"fork":false,"pushed_at":"2022-09-30T15:54:35.000Z","size":13105,"stargazers_count":11,"open_issues_count":6,"forks_count":9,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-04-27T08:36:04.775Z","etag":null,"topics":["angular","capacitor","capacitor-plugin","ionic","twitter"],"latest_commit_sha":null,"homepage":"https://capacitor.ionicframework.com/docs/","language":"TypeScript","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/capacitor-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-01-21T20:17:33.000Z","updated_at":"2023-06-02T14:00:33.000Z","dependencies_parsed_at":"2022-09-10T11:31:16.945Z","dependency_job_id":null,"html_url":"https://github.com/capacitor-community/twitter","commit_stats":null,"previous_names":["stewwan/capacitor-twitter"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ftwitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ftwitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ftwitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ftwitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capacitor-community","download_url":"https://codeload.github.com/capacitor-community/twitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213864403,"owners_count":15649317,"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":["angular","capacitor","capacitor-plugin","ionic","twitter"],"created_at":"2024-08-03T23:00:49.348Z","updated_at":"2024-08-03T23:04:14.077Z","avatar_url":"https://github.com/capacitor-community.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\u003cbr\u003e\u003cimg src=\"https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png\" width=\"128\" height=\"128\" /\u003e\u003c/p\u003e\n\u003ch3 align=\"center\"\u003eCapacitor Twitter\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\u003cstrong\u003e\u003ccode\u003e@capacitor-community/twitter\u003c/code\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Capacitor community plugin for enabling TwitterKit capabilities\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/maintenance/yes/2022?style=flat-square\" /\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/twitter\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@capacitor-community/twitter?style=flat-square\" /\u003e\u003c/a\u003e\n\u003cbr\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/twitter\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@capacitor-community/twitter?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/twitter\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@capacitor-community/twitter?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\u003ca href=\"#contributors\"\u003e\u003cimg src=\"https://img.shields.io/badge/all%20contributors-3-orange?style=flat-square\" /\u003e\u003c/a\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n\u003c/p\u003e\n\n## Sponsors\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://intenseloop.com\"\u003e\n      \u003cimg src=\"https://static.intenseloop.com/assets/logo-512x512.png\" width=\"40\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://intenseloop.com\"\u003e\n      Intenseloop\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Maintainers\n\n| Maintainer   | GitHub                                  | Social                                    |\n| ------------ | --------------------------------------- | ----------------------------------------- |\n| Stewan Silva | [stewones](https://github.com/stewones) | [@stewones](https://twitter.com/stewones) |\n\n## Notice 🚀\n\nWe're starting fresh under an official org. If you were using the previous npm package `capacitor-twitter`, please update your package.json to `@capacitor-community/twitter`. Check out [changelog](/CHANGELOG.md) for more info.\n\n## Installation\n\nUsing npm:\n\n```bash\nnpm install @capacitor-community/twitter\n```\n\nUsing yarn:\n\n```bash\nyarn add @capacitor-community/twitter\n```\n\nSync native files:\n\n```bash\nnpx cap sync\n```\n\n## API\n\n- Login\n- Logout\n- isLogged\n\n## Usage\n\n```js\nimport { Twitter } from \"@capacitor-community/twitter\";\nconst twitter = new Twitter();\n\ntwitter\n  .login()\n  .then((r) =\u003e console.log(r)) // { authToken:string, authTokenSecret:string, userName:string, userID:string }\n  .catch((err) =\u003e console.log(err));\n\ntwitter\n  .isLogged()\n  .then((r) =\u003e console.log(r)) // returns { in: boolean, out: boolean }\n  .catch((err) =\u003e console.log(err));\n\ntwitter.logout();\n```\n\n## iOS setup\n\n- `ionic start my-cap-app --capacitor`\n- `cd my-cap-app`\n- `npm install —-save @capacitor-community/twitter`\n- `mkdir www \u0026\u0026 touch www/index.html`\n- `npx cap add ios`\n- add the consumer keys at `capacitor.config.json`\n\n```\n{\n …\n  \"plugins\": {\n   \"Twitter\": {\n      \"consumerKey\": \"xxx\",\n      \"consumerSecret\": \"yyy\"\n    }\n  }\n…\n}\n```\n\n- npx cap open ios\n- sign your app at xcode (general tab)\n- add a new url type at Xcode (info tab) and make sure the url scheme follows the format `twitterkit-your_consumer_api_key` (grab a key at twitter developer site)\n- also at twitter developer site, add a new callback url in the same format: `twitterkit-your_consumer_api_key://` (with nothing behind it)\n\nThen you should be set to go. Run `ionic cap run ios --livereload` to start the server and play it through xcode\n\n\u003e Important Notice: every time you change a native code you may need to clean the cache (Product \u003e Clean build folder) and then run the app again.\n\n## Android setup\n\n- `ionic start my-cap-app --capacitor`\n- `cd my-cap-app`\n- `npm install —-save @capacitor-community/twitter`\n- `mkdir www \u0026\u0026 touch www/index.html`\n- `npx cap add android`\n- add the consumer keys at `capacitor.config.json`\n\n```\n{\n …\n  \"plugins\": {\n   \"Twitter\": {\n      \"consumerKey\": \"xxx\",\n      \"consumerSecret\": \"yyy\"\n    }\n  }\n…\n}\n```\n\n- at twitter developer site, add this callback url: `twittersdk://` (with nothing behind it)\n- `[extra step]` in android case we need to tell Capacitor to initialise the plugin:\n\n\u003e on your `MainActivity.java` file add `import com.getcapacitor.community.twitter.TwitterPlugin;` and then inside the init callback `add(TwitterPlugin.class);`\n\nNow you should be set to go. Try `ionic cap run android --livereload` to start the server and play/debug it through Android Studio\n\n\u003e Important Notice: every time you change a native code you may need to clean the cache (Build \u003e Clean Project | Build \u003e Rebuild Project) and then run the app again.\n\n## Example\n\n- https://github.com/capacitor-community/twitter/blob/master/example\n\n## License\n\nMIT\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://twitter.com/StewanSilva\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/719763?v=4?s=75\" width=\"75px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eStew\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/capacitor-community/twitter/commits?author=stewwan\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/capacitor-community/twitter/commits?author=stewwan\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/mesqueeb\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3253920?v=4?s=75\" width=\"75px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLuca Ban\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/capacitor-community/twitter/commits?author=mesqueeb\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/eidanfi\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/18303572?v=4?s=75\" width=\"75px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eeidanfi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-eidanfi\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","funding_links":[],"categories":["Plugins","Community plugins"],"sub_categories":["Community Plugins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitor-community%2Ftwitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapacitor-community%2Ftwitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitor-community%2Ftwitter/lists"}