how to access this url https://stream.twitter.com/1.1/statuses/firehose.json from twitter4j? I hope this will return all public statuses.
Asked
Active
Viewed 417 times
1 Answers
0
This should work.
Twitter twitter = TwitterFactory.getSingleton();
List<Status> statuses = twitter.getHomeTimeline();
System.out.println("Showing home timeline.");
for (Status status : statuses) {
System.out.println(status.getUser().getName() + ":" +
status.getText());
}

sbose
- 1,791
- 5
- 24
- 46
-
yup. this is working. But I don't want my own timeline. I want it to get all public statuses. This [link](https://dev.twitter.com/docs/api/1.1/get/statuses/firehose) gives a JSON url and I don't know how to access that URL in twitter4j. Could you please help me? – sattu Feb 13 '13 at 10:11
-
I'd suggest you to paste a section of the content of the URL in the question. I'm behind a firewall - your link is not opening for me :( – sbose Feb 13 '13 at 10:14
-
contents are : Returns all public statuses. Few applications require this level of access. Creative use of a combination of other resources and various access levels can satisfy nearly every application use case. Resource URL https://stream.twitter.com/1.1/statuses/firehose.json Example Request Use the OAuth tool in this page sidebar to generate the OAuth signature for this request. GET https://stream.twitter.com/1.1/statuses/firehose.json – sattu Feb 13 '13 at 10:22