Can't query the POST streaming API using the "locations" parameter


#1

Hi there,

I am trying to get a stream of APIs based on location in order to perform some experiments and see how useful the data potentially is. I am using the POST streaming API (endpoint https://stream.twitter.com/1.1/statuses/filter.json), and strictly following the documentation. I’ve included the “locations” parameter in the body of the request as follows:

req[“locations”]=“2.125854,39.132058,3.619995,40.113658”

The authentication goes right, but instead of getting the stream of data, i get the following message:

“Parameter locations has too many items specified"

I’ve checked the documentation and my “locations” parameter seems to have the right amount of items to define a bounding_box. What am I doing wrong? Is it the role of my user? Is the bounding_box too big?

I am accessing the streaming API using a python script. I am happy to share if it helps.

Thanks for your help!!

Diego.


#2

Hi Diego,

Did you ever solve this issue? I’m currently running into exactly the same thing using curl at the command line.

Edit: of course, 3 minutes later I made progress. I used this as my URI https://stream.twitter.com/1.1/statuses/filter.json instead of sample.json and it worked.

Hope that helps.

Cheers,
Matt