TwitterStreamListener Best Practice
When using the TwitterStreamListener activity, follow the guidelines to optimize the system resources and avoid situations where Twitter closes the stream.
The following are the situations where Twitter closes the stream or interferes with your application. To avoid these situations, take note of the stream behaviors and following the rules when creating listeners.
Public Stream
When listening to the public stream, conform to the following rules when creating listeners.
User Stream
When listening to the user stream, conform to the following rules when creating listeners.
Situations | Solutions/Suggestions/Reasons |
---|---|
Each Twitter account is limited to only a few simultaneous User Streams connections per OAuth application regardless of the IP. | Minimize the number of connections your application makes to User Streams. |
Twitter bans the account temporarily from User Streams for an excessive login rate or starting and stopping frequently. | Avoid logging in with same account too often. |
Number of simultaneous connections per IP address is still limited, regardless of application. | Do not use multiple connections from a same IP. |
Copyright © Cloud Software Group, Inc. All rights reserved.