javascript - Twitter APIs : update working, but filter does not -


twitter apis : update working, filter not javascript twitter oauth twitter-api jsoauth

in following code, instantiate instance of oauth jsoauth library bytespider

 // jsoauth api reference: // http://bytespider.github.com/jsoauth/api-reference/ var twitter = new oauth(oauthoptions); //authentication occurs console.log('url: ' + url); console.log('data: ' + json.stringify(data)); twitter.post( url, data, success, failure ); 

when access stream:

 url: https://stream.twitter.com/1/statuses/filter.json data: {"track":"%40twitterapi"} --> not work, neither `success` nor `failure` callbacks called, hangs 

when tweet:

 url: https://api.twitter.com/1/statuses/update.json data: {"status":"foobar","trim_user":true,"include_entities":true} --> works, `success` callback gets called 

my guess authentication details not getting through stream.twitter.com api, though through api.twitter.com api. can safely rule out oauth issues being able tweet demonstrates authentication has succeeded.

what doing wrong here?

thanks!

it's not

this not work, neither success nor failure callbacks called, hangs

because using streaming api, meant "hang", using means opening connection twitter's servers kept alive long application running. every new tweet sent connection in realtime water through pipe.

you should using html5 websockets.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -