Is there anyone who can explain (and tell how to fix) why this works fine:
“POST /1.1/statuses/filter.json HTTP/1.1
Host: stream.twitter.com
Authorization: OAuth oauth_consumer_key=”<my_key>", oauth_nonce="<my_nonce>", oauth_signature="<my_signature>", oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1234567890”, oauth_token="<my_token>", oauth_version="1.0"
Content-Length: 97
Content-Type: application/x-www-form-urlencoded
track=eredivisie%20live%2Cfox%20sports%2Cinternational%2Csport%201%2Cfox%20sports%20international"
Code created in php
and this results in “ERROR: HTTP/1.1 401 Unauthorized”:
“POST /1.1/statuses/filter.json HTTP/1.1
Host: stream.twitter.com
Authorization: OAuth oauth_consumer_key=”<my_key>", oauth_nonce="<my_nonce>", oauth_signature="<my_signature>", oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1234567890”, oauth_token="<my_token>", oauth_version="1.0"
Content-Length: 123
Content-Type: application/x-www-form-urlencoded
locations=3%2C50%2C8%2C54&track=eredivisie%20live%2Cfox%20sports%2Cinternational%2Csport%201%2Cfox%20sports%20international"
The only difference is the additional locations parameter.
When I make the request in cURL
–data "locations=3%2C50%2C8%2C54&track=eredivisie%20live%2Cfox%20sports%2Cinternational%2Csport%201%2Cfox%20sports%20international"
it works fine.
Hans