5

Is it possible to change the filter keywords on a Twitter stream while it's open?

I'm looking to follow the second point of the http://dev.twitter.com/pages/streaming_api pre-launch checklist, "Creating the minimal number of connections", and avoid closing and re-opening the stream each time the keywords I wish to follow change.

Ollie Glass
  • 19,455
  • 21
  • 76
  • 107

2 Answers2

6

you can't change the filter predicate without reconnecting, but the streaming-api concepts page has instructions how change the predicates and making the user experience as smooth as possible

Nikolaus Gradwohl
  • 19,708
  • 3
  • 45
  • 61
  • Thanks for this. If you could site a definitive source for it not being possible to change predicates without reconnecting I'd be happy to accept your answer as correct. – Ollie Glass Apr 26 '11 at 10:08
  • "Reconnect to update filter predicates when the user adds a new track query" – Nikolaus Gradwohl Apr 26 '11 at 10:41
  • also see http://dev.twitter.com/pages/streaming_api_concepts#connecting "To connect to the Streaming API, form a HTTP request and consume the resulting stream for as long as is practical" – Nikolaus Gradwohl Apr 26 '11 at 10:43
1

Official documentation says you cannot update the filter predicates; http://dev.twitter.com/pages/streaming_api_concepts#updating-filter-predicates

Paul Watson
  • 732
  • 7
  • 17