我试图弄清楚如何使用Twitter4J发布使用Twitter4J的推特线程。我猜想它会以某种方式使用StatusUpdate类,但是文档有点稀疏。有什么指示吗?
发布于 2019-01-13 12:28:30
您应该将inReplyToStatusId设置为在第一条推文之后的每条推文的最新发布状态id。inReplyToStatusId的默认值是-1。
示例:
long inReplyToStatusId = -1
int counter = 0
int threadLimit = 5
while (counter < threadLimit){
StatusUpdate statusUpdate = new StatusUpdate(Integer.toString(counter));
statusUpdate.setInReplyToStatusId(inReplyToStatusId);
Status updatedStatus = twitter.updateStatus(statusUpdate);
inReplyToStatusId = updatedStatus.getId();
counter++;
}https://stackoverflow.com/questions/54137712
复制相似问题