private boolean retweetedAlready(Status status) throws TwitterException { if(status.isRetweetedByMe() && status.getRetweetCount() > 1 ){ return true; // this twit retweeted by your and others } else if(status.isRetweetedByMe() && status.getRetweetCount() == 1 ) return true; // this twit only retweeted by your }else{ return false; // this twit not retweeted by your but mybe others retweeted }
/** * Determines whether a given tweet is a retweet made by the current user. Twitter's API really is unhelpful on this * side so we mostly take an educated guess here, although it should be enough in most cases. * * @param status the tweet to test against * * @return true if and only if the given status is a retweet made by the current user */ public boolean isRetweetByCurrentUser(final Status status) { if (status.isRetweet()) { final Status retweetedStatus = status.getRetweetedStatus(); return retweetedStatus.isRetweeted() || retweetedStatus.isRetweetedByMe() || sessionManager.isCurrentUser(status.getUser()); } else { return false; } }
.put("Retweet", status.isRetweet()) .put("RetweetCount", status.getRetweetCount()) .put("RetweetedByMe", status.isRetweetedByMe()) .put("CurrentUserRetweetId", status.getCurrentUserRetweetId()) .put("PossiblySensitive", status.isPossiblySensitive())