转推使用Twitter4j的Andr​​oidTwitter4j、Andr、oid

2023-09-05 04:04:32 作者:每一段路、都是一种领悟

我试图做简单的应用程序Twitter和我使用twitter4j图书馆,我得到了很好的教程如何登录和二手该库。我的应用程序显示的时间线,并有转推按钮,我的问题是如何使用twitter4j库转推?

i'm trying make simple app twitter and i use twitter4j library and i got good tutorial how to login and post twitter used that library. my app display timeline and had retweet button, my question how to retweet using twitter4j library?

推荐答案

您可以拨打Status#retweet()或TwitterStream#retweet()与原来的鸣叫ID。

You can call Status#retweet() or TwitterStream#retweet() with the original tweet id.

您也可以使用微博#retweetStatus(),例如:

Twitter twitter = new TwitterFactory().getInstance();
twitter.retweetStatus(idOfStatusToRetweet);