javaee-samples / javaee7-samples

Java EE 7 Samples
https://travis-ci.org/javaee-samples/javaee7-samples
Other
2.51k stars 1.66k forks source link

Extra / Twitter-Search example dependends on non public SNAPSHOT dependency #25

Open rdebusscher opened 11 years ago

rdebusscher commented 11 years ago

extra\twitter-search\pom.xml

    <dependency>
        <groupId>org.glassfish.samples</groupId>
        <artifactId>twitter-api</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
aslakknutsen commented 10 years ago

Could be replaced with Twitter4j

      <dependency>
           <groupId>org.twitter4j</groupId>
           <artifactId>twitter4j-core</artifactId>
           <version>[4.0,)</version>
       </dependency>
    // The factory instance is re-useable and thread safe.
    Twitter twitter = TwitterFactory.getSingleton();
    Query query = new Query("source:twitter4j yusukey");
    QueryResult result = twitter.search(query);
    for (Status status : result.getTweets()) {
        System.out.println("@" + status.getUser().getScreenName() + ":" + status.getText());
    }

https://github.com/yusuke/twitter4j/blob/master/twitter4j-examples/src/main/java/twitter4j/examples/search/SearchTweets.java

arun-gupta commented 10 years ago

Send a PR ?