How to get a tweet with its full JSON in Twitter4j

Viewed 11600

I need to retrive a list of tweets, with many informations (easily retrievable from some Tweet.getX() methods) except for the tweet's entire JSON.

I can't figure out how to get the JSON of a tweet belonging from a QueryResult. Anyone can help me?

2 Answers

I think Bill answered the question but those who are still wondering about using TwitterObjectFactory, I believe it's done like this:

ResponseList<Status> userTimeline = // init twitter instance

userTimeline.forEach(x -> {
        String json = TwitterObjectFactory.getRawJSON(x);
        System.out.println(json);
    });
Related