Twitter integration:consumer key/secret pair already set

Looking at both the code and documentation, it looks like your method of instantiating a Twitter instance is not recommended. If you want to supply configuration programmatically (and not use properties), it looks like you need to supply a Configuration to the TwitterFactory. … ConfigurationBuilder builder = new ConfigurationBuilder(); builder.setOAuthConsumerKey(CONSUMER_KEY); builder.setOAuthConsumerSecret(CONSUMER_SECRET); Configuration configuration = builder.build(); … Read more

Get tweets of a public twitter profile

To use Twitter4J to get all posts from a user you’ll have to make your request over multiple pages.. Below code based of an example on GitHub Twitter unauthenticatedTwitter = new TwitterFactory().getInstance(); //First param of Paging() is the page number, second is the number per page (this is capped around 200 I think. Paging paging … Read more