Each account may create only one standing connection to the public endpoints, and connecting to a public stream more than once with the same account credentials will cause the oldest connection to be disconnected.
Clients which make excessive connection attempts (both successful and unsuccessful) run the risk of having their IP automatically banned
This causes us a problem, because in the best case scenario we'd keep a connection open for the duration the game is open. That still creates a new connection each time the game is reopened, Twitter will eventually block if you open a connection too often.
My solution is to use the historic API, and implement a sort of Tweet buffer... E.g load 10 minutes worth of tweets, play them back in real time, and make the class automatically request more Tweets if the player is close to exhausting the cached Tweets.
Ideally I'd love to have a mode in the game where tweets came in at real time, however this doesn't seem likely with the current Twitter API.
The Twitter Streaming API says...
This causes us a problem, because in the best case scenario we'd keep a connection open for the duration the game is open. That still creates a new connection each time the game is reopened, Twitter will eventually block if you open a connection too often.
My solution is to use the historic API, and implement a sort of Tweet buffer... E.g load 10 minutes worth of tweets, play them back in real time, and make the class automatically request more Tweets if the player is close to exhausting the cached Tweets.