Question

Hi I've been struggling with this issue for a few days now. I have a simple node.js app that connects to Twitter's streaming API and tracks a few terms. As a term is found the client side gets a websocket notification. I've made sure that my OAuth credentials are only used by this app and that the connection to the streaming API occurs only on app start up. What keeps happening is I get a 200 ok response but the stream then disconnects. I have it set to reconnect in 30 seconds but it's becoming ridiculous. It seems to be fine for a few minutes after restarting the app and then goes back to repeatedly disconnecting. The error is {"disconnect":{"code":7,"stream_name":"XXXXX-statuses158325","reason":"admin logout"}}. I have ran the same app locally with multiple client connections and not had a problem. I looked into other hosting services but I can't find one that supports websockets without having to revert to a slow long polling option on socket.io (which won't work for my app's purposes).

Any ideas for why this keeps happening?

Était-ce utile?

La solution

that error means that you're connecting again with the same credentials (https://dev.twitter.com/discussions/11251). One cause might be running more than 1 drone.

If this doesn't help, join us on http://webchat.jit.su and we'll do our best to help you :D

-yawnt

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top