Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8796745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:41:36+00:00 2026-06-13T23:41:36+00:00

I have not being banned by Twitter yet. However, I would like to avoid

  • 0

I have not being banned by Twitter yet. However, I would like to avoid it.
I have simple method using StatusListener to pull the tweets according to the keywords array, then they will be filtered by the branches array. As I understood, StatusLintener gets only the new tweets and still running till the application be stopped.

I think this code will reach the rate limit after a while. So, is there any way to handle it?
An authentication request can request 350 time in a hour, how does it work with StatusLintener?

public static void getTweetsKeywords(ConfigurationBuilder cb, String[] keywords, String[] branches,){
    TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance();

    StatusListener listener = new StatusListener() {

        public void onStatus(Status status) {   
            System.out.println(status.getCreatedAt()+" - "+"@" + status.getUser().getScreenName() + " - " + status.getText());
        }

        public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {
            System.out.println("Got a status deletion notice id:" + statusDeletionNotice.getStatusId());
        }

        public void onTrackLimitationNotice(int numberOfLimitedStatuses) {
            System.out.println("Got track limitation notice:" + numberOfLimitedStatuses);
        }

        public void onScrubGeo(long userId, long upToStatusId) {
            System.out.println("Got scrub_geo event userId:" + userId + " upToStatusId:" + upToStatusId);
        }

        public void onException(Exception ex) {
            ex.printStackTrace();
        }
    };

    FilterQuery fq = new FilterQuery();
    fq.track(keywords);

    twitterStream.addListener(listener);
    twitterStream.filter(fq);      
}

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:41:37+00:00Added an answer on June 13, 2026 at 11:41 pm

    StatusListener doesn’t poll the Twitter API to obtain the tweets. It listens to the stream of tweets from Twitter Streaming API. It is therefore not subject to rate limitations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a quick issue with my connection not being intialized. When I call
I have an interesting issue with HTTPS ports not being handled properly. It is
I have a custom authorize attribute on my controllers and it is not being
I have an app where it seems to me that memory is not being
Im having a problem with the HeaderText not being translated when i have definied
Sorry guys, not being lazy, I know others have had the same error message
CSV has field that is being parsed which may or may not have entries
I have following code that does not work due to a being a value
I have a page being ajaxed in, but the document ready code will not
Is there a valid reason for there not being a method to return the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.