Download Jar. Uses 284K of libraries. Click here for Pure Java version (1032L/8K).
!7 lib 1013889 // twitter4j import twitter4j.*; import twitter4j.conf.*; p { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setDebugEnabled(true) /*.setUser("LuaOS") .setPassword(loadSecretJavaXFile("twitter-luaos-pw.txt"))*/ .setOAuthConsumerKey(botCompany_twitterKey()) .setOAuthConsumerSecret(print(botCompany_twitterSecret())) .setOAuthAccessToken("373454997-rQMAvkXMqiFhOXWDsizjSSsxBvwlu4bHOJqneWmG") .setOAuthAccessTokenSecret(trim(loadSecretJavaXFile("twitter-oauth-secret.txt")); TwitterFactory tf = new TwitterFactory(cb.build()); Twitter twitter = tf.getInstance(); //User user = twitter.verifyCredentials(); L<Status> statuses = twitter.getUserTimeline("xtraa"); print("Showing home timeline."); for (Status status : statuses) print(status.getUser().getName() + ":" + status.getText()); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013888 |
Snippet name: | Test Twitter API [using Twitter4J, OK with password files] |
Eternal ID of this version: | #1013888/16 |
Text MD5: | fe4be10ea3f99caae9feffb30584dfb4 |
Transpilation MD5: | f81bed33e8388ea7f38f98bdd3054161 |
Author: | stefan |
Category: | javax / networking |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-03-11 21:22:28 |
Source code size: | 887 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 507 / 1098 |
Version history: | 15 change(s) |
Referenced in: | #1013893 - twitter4j_init #1013894 - Test Twitter API [compacted, OK with password files] |