{"id":13729344,"url":"https://github.com/redouane59/twittered","last_synced_at":"2026-01-14T02:24:10.786Z","repository":{"id":37496013,"uuid":"236347308","full_name":"redouane59/twittered","owner":"redouane59","description":"Twitter API client for Java developers","archived":false,"fork":false,"pushed_at":"2024-07-31T14:27:45.000Z","size":9591,"stargazers_count":252,"open_issues_count":38,"forks_count":66,"subscribers_count":12,"default_branch":"develop","last_synced_at":"2025-07-10T23:33:44.089Z","etag":null,"topics":["java","twitter","twitter-api","twitter-api-stream","twitter-api-v2","twitter-apis","twitter-app","twitter-application","twitter-authentication","twitter-bot","twitter-cli","twitter-client","twitter-json","twitter-library","twitter-search"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redouane59.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-01-26T17:20:50.000Z","updated_at":"2025-07-04T09:33:40.000Z","dependencies_parsed_at":"2024-02-05T20:41:20.020Z","dependency_job_id":"6d0ef052-d12f-4c42-91f6-bee7a1da5ccb","html_url":"https://github.com/redouane59/twittered","commit_stats":null,"previous_names":["redouane59/twitter-client"],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/redouane59/twittered","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redouane59%2Ftwittered","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redouane59%2Ftwittered/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redouane59%2Ftwittered/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redouane59%2Ftwittered/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redouane59","download_url":"https://codeload.github.com/redouane59/twittered/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redouane59%2Ftwittered/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["java","twitter","twitter-api","twitter-api-stream","twitter-api-v2","twitter-apis","twitter-app","twitter-application","twitter-authentication","twitter-bot","twitter-cli","twitter-client","twitter-json","twitter-library","twitter-search"],"created_at":"2024-08-03T02:00:58.870Z","updated_at":"2026-01-14T02:24:10.771Z","avatar_url":"https://github.com/redouane59.png","language":"Java","readme":"This project is a JAVA library which allows you to consume the Twitter API.\n\n[![v2](https://img.shields.io/endpoint?url=https%3A%2F%2Ftwbadges.glitch.me%2Fbadges%2Fv2)](https://developer.twitter.com/en/docs/twitter-api)\n\n[![Standard](https://img.shields.io/static/v1?label=Twitter%20API\u0026message=v1.1\u0026color=794BC4\u0026style=flat\u0026logo=Twitter)](https://developer.twitter.com/en/docs/api-reference-index)\n\n[![Premium](https://img.shields.io/static/v1?label=Twitter%20API\u0026message=Premium\u0026color=794BC4\u0026style=flat\u0026logo=Twitter)](https://developer.twitter.com/en/docs/tweets/search/api-reference/premium-search)\n\n### Configuration\n\n![Maven Central](https://img.shields.io/maven-central/v/io.github.redouane59.twitter/twittered)\n\nIn your pom.xml, add the following dependency and replace `VERSION` with the version you wish:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.redouane59.twitter\u003c/groupId\u003e\n  \u003cartifactId\u003etwittered\u003c/artifactId\u003e\n  \u003cversion\u003eVERSION\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIf you are using Gradle Kotlin DSL, make sure you have MavenCentral among the available repositories:\n```kotlin\nrepositories {\n    mavenCentral()\n    // [...]\n}\n```\nThen add the following line to your `dependencies` block:\n\n```kotlin\nimplementation(\"io.github.redouane59.twitter:twittered:VERSION\")\n```\n\nTo be able to see library logs, also add sl4j references :\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.slf4j\u003c/groupId\u003e\n  \u003cartifactId\u003eslf4j-api\u003c/artifactId\u003e\n  \u003cversion\u003e1.7.30\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.slf4j\u003c/groupId\u003e\n  \u003cartifactId\u003eslf4j-simple\u003c/artifactId\u003e\n  \u003cversion\u003e1.7.30\u003c/version\u003e\n\u003c/dependency\u003e\n``` \n\nIn order to use your own developer credentials, you have several options :\n\n#### Using a json file\n\nFile example :\n\n```json\n{\n  \"apiKey\": \"xxx\",\n  \"apiSecretKey\": \"xxx\",\n  \"accessToken\": \"xxx\",\n  \"accessTokenSecret\": \"xxx\"\n}\n```\n\n##### With program argument\n\nPass through java argument your file path like `-Dtwitter.credentials.file.path=/your/path/to/json`\n. Then instantiate the client like\n\n```java\nTwitterClient client = new TwitterClient();\n```\n\nor\n\n##### Using deserialization in your code\n\n```java\nTwitterClient twitterClient = new TwitterClient(TwitterClient.OBJECT_MAPPER\n                                                    .readValue(new File(\"/your/path/to/json\"), TwitterCredentials.class));\n``` \n\n#### With hard-coded values\n\n```java\nTwitterClient twitterClient = new TwitterClient(TwitterCredentials.builder()\n                                                            .accessToken(\"\u003caccess_token\u003e\")\n                                                            .accessTokenSecret(\"\u003csecret_token\u003e\")\n                                                            .apiKey(\"\u003capi_key\u003e\")\n                                                            .apiSecretKey(\"\u003csecret_key\u003e\")\n                                                            .build());\n``` \n\nNB : Your twitter credentials can be found\nin [your twitter app page](https://developer.twitter.com/en/apps) in the _Key and tokens_\npage.\n\n### Available methods\n\nSee :\n\n- [ITwitterClientV2.java](https://github.com/redouane59/twittered/blob/develop/src/main/java/io/github/redouane59/twitter/ITwitterClientV2.java)\n- [ITwitterClientV1.java](https://github.com/redouane59/twittered/blob/develop/src/main/java/io/github/redouane59/twitter/ITwitterClientV1.java)\n- [Tweet.java](https://github.com/redouane59/twittered/blob/develop/src/main/java/io/github/redouane59/twitter/dto/tweet/Tweet.java)\n- [User.java](https://github.com/redouane59/twittered/blob/develop/src/main/java/io/github/redouane59/twitter/dto/user/User.java)\n\n### Code samples\n\nSee :\n\n- [ITwitterClientV2Test.java](https://github.com/redouane59/twittered/blob/develop/src/test/java/io/github/redouane59/twitter/nrt/ITwitterClientV2Test.java)\n- [ITwitterClientV2AuthenticatedTest.java](https://github.com/redouane59/twittered/blob/develop/src/test/java/io/github/redouane59/twitter/nrt/ITwitterClientV2AuthenticatedTest.java)\n- [ITwitterClientV1Test.java](https://github.com/redouane59/twittered/blob/develop/src/test/java/io/github/redouane59/twitter/nrt/ITwitterClientV1Test.java)\n\n### Basic examples\n\n#### 1. Init TwitterClient\n\n```java\nTwitterClient twitterClient = new TwitterClient(TwitterClient.OBJECT_MAPPER\n                                  .readValue(new File(\"/your/path/to/json\"), TwitterCredentials.class));\n```\n\n#### 2. Get Tweet object from tweet id and display some information\n\n```java\nTweet  tweet   = twitterClient.getTweet(\"1224041905333379073\");\nSystem.out.println(tweet.getText());\nSystem.out.println(tweet.getCreatedAt());\nSystem.out.println(tweet.getLang());\nSystem.out.println(tweet.getLikeCount());\nSystem.out.println(tweet.getRetweetCount());\nSystem.out.println(tweet.getReplyCount());\nSystem.out.println(tweet.getUser().getName());\n```\n\n#### 3. Get User object from username and display some information\n\n```java\nUser   user   = twitterClient.getUserFromUserName(\"RedouaneBali\");\nSystem.out.println(user.getName());\nSystem.out.println(user.getDisplayedName());\nSystem.out.println(user.getDateOfCreation());\nSystem.out.println(user.getDescription());\nSystem.out.println(user.getTweetCount());\nSystem.out.println(user.getFollowersCount());\nSystem.out.println(user.getFollowingCount());\nSystem.out.println(user.getPinnedTweet());\nSystem.out.println(user.getPinnedTweet());\nSystem.out.println(user.getLocation());\nSystem.out.println(user.getId());\nSystem.out.println(user.getUrl());\n```\n\n### Contribution\n\nIf you want to contribute to the project, don't hesitate to submit pull requests. To add a new\nfeature :\n\n- Create the interface method in the related interface (\n  e.g [ITwitterClientV2.java](https://github.com/redouane59/twittered/blob/develop/src/main/java/io/github/redouane59/twitter/ITwitterClientV2.java))\n- If needed, add the endpoint URL\n  in [URLHelper.java](https://github.com/redouane59/twittered/blob/develop/src/main/java/io/github/redouane59/twitter/helpers/URLHelper.java)\n- Implement your method in the child class (\n  e.g [TwitterClient.java](https://github.com/redouane59/twittered/blob/develop/src/main/java/io/github/redouane59/twitter/TwitterClient.java))\n- Don't forget to add your unit tests in `src/test/java/io/github/redouane59/twitter/unit`\n\nCode style is also available in `.idea/codeStyles/GoogleStyle.xml` file.\n\n### External Resources\n\n[Twitter Developers docs](https://developer.twitter.com/en/docs)\n\n### Special thanks\n\nI would like to give special thanks to\n[@hypr2771](https://github.com/hypr2771)\n[@mmornati](https://github.com/mmornati)\n[@andypiper](https://github.com/andypiper)\n[@igorbrigadir](https://github.com/igorbrigadir)\n[@sparack](https://github.com/sparack)\nfor having helped me building this Twitter API library for Java. The tool is now working and I hope\nthat students, junior and senior developers will enjoy it, being able to play easily with twitter\ndata using Java programming language.\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Java"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredouane59%2Ftwittered","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredouane59%2Ftwittered","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredouane59%2Ftwittered/lists"}