Search code examples
androidtwittertwitter4j

Retweet using Twitter4j Android


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?


Solution

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

    You can also use Twitter#retweetStatus(), for example:

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