List of usage examples for twitter4j Status getText
String getText();
From source file:net.lacolaco.smileessence.twitter.util.TwitterUtils.java
License:Open Source License
/** * Return original status text. If status is not retweet, value is same to a given. * * @param status/*from www.jav a 2s. co m*/ * @return */ public static String getOriginalStatusText(Status status) { return status.isRetweet() ? status.getRetweetedStatus().getText() : status.getText(); }
From source file:net.lacolaco.smileessence.viewmodel.EventViewModel.java
License:Open Source License
public EventViewModel(EnumEvent event, User source, Status status) { this.event = event; this.createdAt = new Date(); this.sourceUserID = source.getId(); this.sourceScreenName = source.getScreenName(); this.sourceName = source.getName(); this.iconURL = source.getProfileImageURL(); if (status != null) { if (event == EnumEvent.RETWEETED) { this.targetStatusID = status.getRetweetedStatus().getId(); this.targetText = status.getRetweetedStatus().getText(); } else {/*www. jav a2 s. c o m*/ this.targetStatusID = status.getId(); this.targetText = status.getText(); } } else { this.targetStatusID = -1L; this.targetText = ""; } }
From source file:net.lacolaco.smileessence.viewmodel.StatusViewModel.java
License:Open Source License
public StatusViewModel(Status status, Account account) { if (status.isRetweet()) { retweetedStatus = new StatusViewModel(status.getRetweetedStatus(), account); }//from ww w .ja va 2s . c om id = status.getId(); text = TwitterUtils.replaceURLEntities(status.getText(), status.getURLEntities(), false); createdAt = status.getCreatedAt(); source = status.getSource(); mentions = status.getUserMentionEntities(); hashtags = status.getHashtagEntities(); media = status.getMediaEntities(); urls = status.getURLEntities(); symbols = status.getSymbolEntities(); User user = status.getUser(); UserCache.getInstance().put(user); userID = user.getId(); screenName = user.getScreenName(); name = user.getName(); iconURL = user.getProfileImageURLHttps(); isProtected = user.isProtected(); setMention(isMention(account.screenName)); setMyStatus(isMyStatus(account.userID)); setRetweetOfMe(isRetweetOfMe(account.userID)); }
From source file:net.naijatek.myalumni.util.taglib.TwitterTag.java
License:Open Source License
/** * Process the end of this tag./*from w w w . j ava2 s . c om*/ * * @throws JspException if a JSP exception has occurred * @return int */ @Override public final int doEndTag() throws JspException { request = (HttpServletRequest) pageContext.getRequest(); StringBuffer sb = new StringBuffer(); AppProp ap = AppProp.getInstance(); //MemberVO token = null; //if (container != null) { // token = container.getToken(); //} try { TwitterVO twitterVO = configService.getTwitterCredentials(); List<String> list = new ArrayList<String>(); Twitter twitter = new Twitter(twitterVO.getTwitteruser(), twitterVO.getTwitterpswd()); List<Status> statuses = twitter.getFriendsTimeline(); // System.out.println("Showing friends timeline."); for (Status status : statuses) { //System.out.println(status.getUser().getName() + ":" + status.getText()); list.add("<img src=\"" + status.getUser().getProfileImageURL() + "\" height=\"48\" width=\"48\" align=\"left\"><strong>" + status.getUser().getName() + "</strong>:" + status.getText()); } twitterVO.setMytweets(list); request.setAttribute(BaseConstants.TWITTER_VO, twitterVO); } catch (Exception e) { sb.append(ap.getValue("core.errorcode.00714"));//Problem encountered while retrieving class news } return EVAL_PAGE; }
From source file:net.nokok.twitduke.core.twitter.PrintStatusListener.java
License:Open Source License
@Override public void onStatus(Status status) { System.out.println("onStatus: " + status.getText()); }
From source file:net.nokok.twitduke.core.twitter.PrintUserStreamListener.java
License:Open Source License
@Override public void onFavorite(User source, User target, Status favoritedStatus) { System.out.println("onFavorite: " + source.getScreenName() + "," + target.getScreenName() + "," + favoritedStatus.getText()); }
From source file:net.nokok.twitduke.core.twitter.PrintUserStreamListener.java
License:Open Source License
@Override public void onStatus(Status status) { System.out.println("onStatus: " + status.getUser().getScreenName() + "," + status.getText()); }
From source file:net.nokok.twitduke.core.twitter.PrintUserStreamListener.java
License:Open Source License
@Override public void onUnfavorite(User source, User target, Status unfavoritedStatus) { System.out.println("onUnfavorite: " + source.getScreenName() + "," + target.getScreenName() + "," + unfavoritedStatus.getText()); }
From source file:net.nokok.twitduke.core.twitter.TwitterNotificationListener.java
License:Open Source License
/** * {@code Optional.}/* w ww. ja va 2 s . c o m*/ * * @param source * @param target * @param favoritedStatus */ @Override public void onFavorite(User source, User target, Status favoritedStatus) { new NotificationFrame(source.getScreenName() + "???????", favoritedStatus.getText(), stringToURL(source.getProfileImageURLHttps())); }
From source file:net.nokok.twitduke.core.twitter.TwitterNotificationListener.java
License:Open Source License
@Override public void onUnfavorite(User source, User target, Status unfavoritedStatus) { new NotificationFrame(source.getScreenName() + "??????", unfavoritedStatus.getText()); }