Package twitter4j

Examples of twitter4j.Status


            System.out.println(
                "Usage: java twitter4j.examples.Update ID Password text");
            System.exit( -1);
        }
        Twitter twitter = new Twitter(args[0], args[1]);
        Status status = twitter.updateStatus(args[2]);
        System.out.println("Successfully updated the status to [" + status.getText() + "].");
    }
View Full Code Here


            System.out.println("Showing " + args[0] + "'s timeline.");
            for (Status status : statuses) {
                System.out.println(status.getUser().getName() + ":" +
                                   status.getText());
            }
            Status status = twitter.show(81642112l);
            System.out.println("------------------------------");
            System.out.println("Showing " + status.getUser().getName() +
                               "'s status updated at " + status.getCreatedAt());
            System.out.println(status.getText());
            System.exit(0);
        } catch (TwitterException te) {
            System.out.println("Failed to get timeline: " + te.getMessage());
            System.exit( -1);
        }
View Full Code Here

                    tweetsMap.put(groupName, statuses);
                }

                for (int j = 0, resultsLen = results.length(); j < resultsLen; ++j) {
                    JSONObject json = results.getJSONObject(j).getJSONObject("value");
                    Status status = new StatusJSONImpl(json);
                    if (registerRawJSON) {
                        DataObjectFactoryUtil.registerJSONObject(status, json);
                    }
                    statuses.add(status);
                }
View Full Code Here

    private javax.swing.JTextField jTextField1;
    // End of variables declaration

    @Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        Status status=(Status) value;
        jLabel1.setText("@"+status.getUser().getScreenName());
        jLabel3.setText(status.getCreatedAt()+"");
        jTextField1.setText(status.getText());
       
        //AVATAR
        URL urlIMG=null;
        try {
            urlIMG = new URL(status.getUser().getProfileImageURL());
        } catch (MalformedURLException ex) {
            Logger.getLogger(Panel_Tweets.class.getName()).log(Level.SEVERE, null, ex);
        }
        ImageIcon img=new ImageIcon(urlIMG);
        jLabel2.setIcon(img);
View Full Code Here

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        if(jTextField1.getText()!=""){
            try {
                //Escribir tweet
                Status tweetEscrito=twitter.updateStatus(jTextField1.getText());
                jTextField1.setText("");
            } catch (TwitterException ex) {
                Logger.getLogger(TwitterFrame.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
View Full Code Here

    public void resetRateLimitCache() {
        rateLimit = -1;
    }

    public Status getTweet(long id) throws TwitterException {
        Status st = twitter.showStatus(id);
        rateLimit--;
        return st;
    }
View Full Code Here

                    User user = (User) res.get(ii);
                    JUser yUser = userMap.get(user.getScreenName().toLowerCase());
                    if (yUser == null)
                        continue;

                    Status stat = yUser.updateFieldsBy(user);
                    if (stat == null)
                        continue;

                    Twitter4JTweet tw = toTweet(stat, user);
                    tweets.add(tw);
View Full Code Here

            throw new RuntimeException(ex);
        }
    }

    public Status doRetweet(long twitterId) throws TwitterException {
        Status st = twitter.retweetStatus(twitterId);
        rateLimit--;
        return st;
    }
View Full Code Here

        }
    }

    @Test
    public void testGetTweetWithGeolocation() throws TwitterException {
        Status st = twitterSearch.getTweet(18845491030L);
        assertNotNull(st.getGeoLocation());
//        System.out.println("geo:" + st.getGeoLocation());
    }
View Full Code Here

        resultEndpoint.assertIsSatisfied();

        List<Exchange> tweets = resultEndpoint.getExchanges();
        assertNotNull(tweets);
        assertThat(tweets.size(), is(1));
        Status receivedTweet = tweets.get(0).getIn().getBody(Status.class);
        assertNotNull(receivedTweet);
        // The identifier for the published tweet should be there
        assertNotNull(receivedTweet.getId());
    }
View Full Code Here

TOP

Related Classes of twitter4j.Status

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.