我正在尝试发送一条Tweet作为响应(reply)到另一条我通过查询找到的推特。
但是虽然我正在调用https://docs.spring.io/spring-social-twitter/docs/current/apidocs/org/springframework/social/twitter/api/TweetData.html#inReplyToStatus(long)并传递正确的状态Id,但是tweet似乎并不是对原始tweet的回复。
我在春季引导应用程序中使用org.springframework.social:spring-social-twitter:jar:1.1.0.RELEASE,我也尝试过最新版本的1.1.2.RELEASE,但仍然无法工作。
相关代码
// Tweet tweet comes from a query
// String statusText is some plain text
final Long inReplyToStatus = tweet.getId();
final TweetData tweetData = new TweetData(statusText);
// try to make it a reply, TODO: doesn't work
tweetData.inReplyToStatus(inReplyToStatus);
// send tweet, but doesn't look like an answer.
final Tweet newTweet = this.twitterTemplateFactory.timelineOperations().updateStatus(tweetData);你有什么问题吗?我必须用"@ .“作为statusText的开头,让它成为一个老派的回答吗?
帮助感激。
发布于 2020-02-21 11:47:57
我猜是对的。如果您希望将您的答案显示为真正的答复,则必须设置"inReplyToStatus“字段,用"@”开始statusText。
问题解决了。
https://stackoverflow.com/questions/59195414
复制相似问题