Method
replyTweet
(String text, String inReplyToTweetId, String whoMentionedMe)
Source from the content-addressed store, hash-verified
| 165 | } |
| 166 | |
| 167 | private static void replyTweet(String text, String inReplyToTweetId, String whoMentionedMe) { |
| 168 | |
| 169 | TweetParameters tweetParams = TweetParameters.builder().text(text).reply(TweetParameters.Reply.builder().inReplyToTweetId(inReplyToTweetId).build()).build(); |
| 170 | |
| 171 | try { |
| 172 | Tweet tweet = twitter.postTweet(tweetParams); |
| 173 | System.out.println("Replied to: " + whoMentionedMe + " - Reply Id: " + tweet.getId()); |
| 174 | } catch (Exception e) { |
| 175 | e.printStackTrace(); |
| 176 | } |
| 177 | |
| 178 | } |
| 179 | } |
Tested by
no test coverage detected