我在推特上工作,我有访问令牌,现在我也收到了推文我想像我们在推特网站上所做的那样回复推文状态请帮我解决这个问题谢谢..
public void tweetReply() {
try {
// System.out.println("Post Id= " + itemsObj.postId);
AccessToken a = new AccessToken(twittertokens[0], twittertokens[1]);
Twitter twitter = new TwitterFactory().getInstance();
twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);
twitter.setOAuthAccessToken(a);
Long id = new Long("236178766597087234");
twitter.updateStatus(new StatusUpdate("@lalitrajput024 this is to test For reply option ").inReplyToStatusId(id));
} catch (Exception e) {
// TODO: handle exception
}
}