Twitter Streaming API + ofxOAuth


Hi All,

I’m working on a project where I’m trying to get tweets from “Streaming API” using @bakercp’s ofxOAuth.
I looked at ofxExampleTwitterClient.h file and modified it a little to use stream API but No luck so far.

void setup(const std::string& consumerKey, const std::string& consumerSecret)
std::string exampleMethod()
        return get("/1.1/statuses/filter.json?track=chicago");

it seemed working but it never returned results.
this is an infinite log while the App is running:

[verbose] WriteMemoryCallback: IN MEMORY CALLBACK
ptr: 0x283eae4
size: 1
nmemb: 158
data: 0xbfffd670
ptr: 0x283eae4
size: 1
nmemb: 158
data: 0xbfffd670
realsize: 158

my guess is that the app waits to return the result until it finishes requesting but with stream API, it keeps requesting the query so the app holds the data in memory. I wonder how can I get these data as the app receives it.
I appreciate if anyone can help me to figure out this, or any suggestion of other resources


Streaming won’t work with ofxOAuth because it uses curl. I have an unpublished example using ofxHTTP … I’ll try to get it posted…


omg… I’ve been looking into the wrong example :slight_smile:
Thank you!


I’d love to see the streaming example using ofxHTTP, as well, if its not too much trouble. Thanks for all the libraries, Christopher!


Perhaps you may show the example once again, I would be really interested in it :wink:


It would be great if you could share with us a hello world of it working