Using the WWW Class with the Twitter Stream

Afternoon all,

I’m trying to create a visualisation of live Twitter data, with the connection to the Twitter stream API embedded the in the Unity application. It will eventually be deployed on a Linux system.

I spent this morning wrestling with OAuth and was eventually able to post a tweet, but I’m having trouble with streaming.

It seems that the WWW class blocks any access to the data returned from the server until the connection has been closed. However, the Twitter stream keeps the connection open indefinitely.

Is there any way of accessing the data as it arrives rather than waiting for the connection to close? I did start looking at HTTPWebRequest, but ran into problems with https.

Any help would be greatly appreciated.

Cheers
C

I’m also trying to use Twitter stream api within Unity. So here’s a bump. I’m looking for any clue as to how to procede or any useful example.

Has this being solved? I am currently working with Node.js writing down the data I need then reading it, but that is getting a bit overwhelming for the machine specially for real time data. I want to swap that and make a direct connection with Unity, is there anything out there for that?

I think what you are looking for is UnityWebRequest with DownloadHandlerScript.

Which Twitter API libs are you guys using?