Twitter + HTML5 webSocket API

html, twitter, websocket

Solution

Twitter does not provide a WebSocket interface. You will have to run a proxy on your own server if you want to access the Twitter Streaming API through WebSockets.

Problem

Is there a way of connecting to Twitter through the HTML5 webSocket API (JavaScript)? Currently http://streamie.org/ seems to be doing something like that but they are leading it through http://local.streamie.org:8888/ so it looks like they are running the websocket. The JavaScript part is quite clear: ``` websocket = new WebSocket('ws://echo.websocket.org/'); websocket.onopen = function(event) { websocket.send('hello from client'); console.log('CONNECTED'); }; websocket.onclose = function(event) { console.log('DISCONNECTED'); }; websocket.onmessage = function(event) { console.log(event.data); }; websocket.onerror = function(event) { }; ``` But what's the websocket address for Twitter?

Original source