Use twurl and streamming API authentication and filter

streaming
api

#1

Hi everybody, I am new to using Stream API and twurl.

I Install twurl in windows and want to use it from the command line to get tweets using the stream api. I want to solve everything within a .bat file. The problem is not how to write, I tried this:

twitter.bat content:

twurl authorize -u <myusername> -p <MyPassword> --consumer-key <Mykey> --consumer-secret <MySecret> -t -d twurl track = <HashTag> H stream.twitter.com /1.1/statuses/filter.json>tweets.txt

The server response is:
… go to url and paste in the supplied PIN

  1. as I can automate this?
  2. as I can get use those credentials to run the following line (the api stream filter)?

Thank you very much x the help you can give me
Bruno


#2

You need to do this as two steps:

  1. twurl authorize -> should give you a link which you can open, get the PIN, and paste back to the command line
  2. twurl -d track ...

#3

Thanks Andy for you answer, but i need automate all process (without user intervention) , is possible to do this?


#4

Andy I paste in command line my PIN (obtined from the url response) and then execute the second line :

twurl -t -d track=#BuenViernes -H stream.twitter.com /1.1/statuses/filter.json>tweets.txt
here is my new error:

\n\n\nError 401 Unauthorized

HTTP ERROR: 401

Problem accessing '/1.1/statuses/filter.json'. Reason:

    Unauthorized

Any Ideas?
thanks!!
Bruno


PHP Streaming API was working fine, now returning 401 Unauthorized error
#5

I did the same steps and got the same error. Any one got solution for this ?