[twitter-dev] Re: Stream API responds with 401 when multiple keywords are used

2010-11-04 Thread Andrew McCloud
I'm also having the same issue. Though it's only when using a space
(e.g. "hello world") to separate keywords.

I've tried urlencoding spaces as a '+' and as '%20'... no luck.

On Oct 15, 4:31 pm, Tom van der Woerdt  wrote:
> If I am not mistaken, 'value1,value2' URLencodes to 'value1%2Cvalue2'
>
> Tom
>
> On 10/16/10 1:25 AM, Corey Wallis wrote:
>
>
>
>
>
>
>
> > Hi Tom,
>
> > Would you have an example of some values before and after they are
> > encoded?
>
> > It would help me in looking for where the error is.
>
> > With thanks.
>
> > -Corey
>
> > On Oct 15, 11:20 pm, Tom van der Woerdt  wrote:
> >> I'd assume that there would be an error in your signature generation.
> >> Make sure that you properly url-encode all values before putting them in
> >> your base string. Make sure to encode only the correct ones.
>
> >> If you've checked this and it still does not work, please show us the
> >> Base String which you use to generate the signature.
>
> >> Tom
>
> >> On 10/15/10 3:40 AM, Corey Wallis wrote:
>
> >>> Hi All,
>
> >>> I have working code that uses OAuth to connect to theStreamAPI and
> >>> filter using keywords. When I supply a single keyword the API works as
> >>> expected and tweets are returned. What is odd is that when I specify
> >>> multiple keywords, or keywords that include a # symbol I get a401
> >>> UNAUTHORIZED error.
>
> >>> Has anyone seen this before and come up with a successful resolution?
>
> >>> I've captured the HTTP headers of both a successful and unsuccessful
> >>> call and I can't see anything that is different other than the list of
> >>> tracks contains multiple entries. Samples of the headers is below.
>
> >>> This works:
>
> >>> POST /1/statuses/filter.json HTTP/1.1
> >>> Authorization: OAuth oauth_token="###", oauth_consumer_key="###",
> >>> oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
> >>> oauth_timestamp="1287106462", oauth_nonce="-1686656262164231601",
> >>> oauth_signature="###"
> >>> Content-Length: 13
> >>> Content-Type: application/x-www-form-urlencoded
> >>> Host:stream.twitter.com
> >>> Connection: Keep-Alive
> >>> User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
> >>> Expect: 100-Continue
>
> >>> HTTP/1.1 100 Continue
>
> >>> track=twitter
>
> >>> This does not:
>
> >>> POST /1/statuses/filter.json HTTP/1.1
> >>> Authorization: OAuth oauth_token="###", oauth_consumer_key="###",
> >>> oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
> >>> oauth_timestamp="1287105193", oauth_nonce="-3374947181315671264",
> >>> oauth_signature="###"
> >>> Content-Length: 20
> >>> Content-Type: application/x-www-form-urlencoded
> >>> Host:stream.twitter.com
> >>> Connection: Keep-Alive
> >>> User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
> >>> Expect: 100-Continue
>
> >>> HTTP/1.1 100 Continue
>
> >>> track=twitter,lolcat
>
> >>> Any thoughts would be gratefully received.
>
> >>> With thanks.
>
> >>> -Corey

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Stream API responds with 401 when multiple keywords are used

2010-10-15 Thread Tom van der Woerdt
If I am not mistaken, 'value1,value2' URLencodes to 'value1%2Cvalue2'

Tom


On 10/16/10 1:25 AM, Corey Wallis wrote:
> Hi Tom,
> 
> Would you have an example of some values before and after they are
> encoded?
> 
> It would help me in looking for where the error is.
> 
> With thanks.
> 
> -Corey
> 
> On Oct 15, 11:20 pm, Tom van der Woerdt  wrote:
>> I'd assume that there would be an error in your signature generation.
>> Make sure that you properly url-encode all values before putting them in
>> your base string. Make sure to encode only the correct ones.
>>
>> If you've checked this and it still does not work, please show us the
>> Base String which you use to generate the signature.
>>
>> Tom
>>
>> On 10/15/10 3:40 AM, Corey Wallis wrote:
>>
>>
>>
>>> Hi All,
>>
>>> I have working code that uses OAuth to connect to the Stream API and
>>> filter using keywords. When I supply a single keyword the API works as
>>> expected and tweets are returned. What is odd is that when I specify
>>> multiple keywords, or keywords that include a # symbol I get a 401
>>> UNAUTHORIZED error.
>>
>>> Has anyone seen this before and come up with a successful resolution?
>>
>>> I've captured the HTTP headers of both a successful and unsuccessful
>>> call and I can't see anything that is different other than the list of
>>> tracks contains multiple entries. Samples of the headers is below.
>>
>>> This works:
>>
>>> POST /1/statuses/filter.json HTTP/1.1
>>> Authorization: OAuth oauth_token="###", oauth_consumer_key="###",
>>> oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
>>> oauth_timestamp="1287106462", oauth_nonce="-1686656262164231601",
>>> oauth_signature="###"
>>> Content-Length: 13
>>> Content-Type: application/x-www-form-urlencoded
>>> Host: stream.twitter.com
>>> Connection: Keep-Alive
>>> User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
>>> Expect: 100-Continue
>>
>>> HTTP/1.1 100 Continue
>>
>>> track=twitter
>>
>>> This does not:
>>
>>> POST /1/statuses/filter.json HTTP/1.1
>>> Authorization: OAuth oauth_token="###", oauth_consumer_key="###",
>>> oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
>>> oauth_timestamp="1287105193", oauth_nonce="-3374947181315671264",
>>> oauth_signature="###"
>>> Content-Length: 20
>>> Content-Type: application/x-www-form-urlencoded
>>> Host: stream.twitter.com
>>> Connection: Keep-Alive
>>> User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
>>> Expect: 100-Continue
>>
>>> HTTP/1.1 100 Continue
>>
>>> track=twitter,lolcat
>>
>>> Any thoughts would be gratefully received.
>>
>>> With thanks.
>>
>>> -Corey
> 

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Stream API responds with 401 when multiple keywords are used

2010-10-15 Thread Corey Wallis
Hi John,

Is there any documentation on the way values should be encoded?

With thanks.

-Corey


On Oct 15, 11:20 pm, John Kalucki  wrote:
> There's at least one OAuth library out there that doesn't encode the comma
> correctly. Search back in this group for details.
>
> -John Kaluckihttp://twitter.com/jkalucki
> Twitter Inc.
>
> On Thu, Oct 14, 2010 at 6:40 PM, Corey Wallis
> wrote:
>
>
>
> > Hi All,
>
> > I have working code that uses OAuth to connect to the Stream API and
> > filter using keywords. When I supply a single keyword the API works as
> > expected and tweets are returned. What is odd is that when I specify
> > multiple keywords, or keywords that include a # symbol I get a 401
> > UNAUTHORIZED error.
>
> > Has anyone seen this before and come up with a successful resolution?
>
> > I've captured the HTTP headers of both a successful and unsuccessful
> > call and I can't see anything that is different other than the list of
> > tracks contains multiple entries. Samples of the headers is below.
>
> > This works:
>
> > POST /1/statuses/filter.json HTTP/1.1
> > Authorization: OAuth oauth_token="###", oauth_consumer_key="###",
> > oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
> > oauth_timestamp="1287106462", oauth_nonce="-1686656262164231601",
> > oauth_signature="###"
> > Content-Length: 13
> > Content-Type: application/x-www-form-urlencoded
> > Host: stream.twitter.com
> > Connection: Keep-Alive
> > User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
> > Expect: 100-Continue
>
> > HTTP/1.1 100 Continue
>
> > track=twitter
>
> > This does not:
>
> > POST /1/statuses/filter.json HTTP/1.1
> > Authorization: OAuth oauth_token="###", oauth_consumer_key="###",
> > oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
> > oauth_timestamp="1287105193", oauth_nonce="-3374947181315671264",
> > oauth_signature="###"
> > Content-Length: 20
> > Content-Type: application/x-www-form-urlencoded
> > Host: stream.twitter.com
> > Connection: Keep-Alive
> > User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
> > Expect: 100-Continue
>
> > HTTP/1.1 100 Continue
>
> > track=twitter,lolcat
>
> > Any thoughts would be gratefully received.
>
> > With thanks.
>
> > -Corey
>
> > --
> > Twitter developer documentation and resources:http://dev.twitter.com/doc
> > API updates via Twitter:http://twitter.com/twitterapi
> > Issues/Enhancements Tracker:
> >http://code.google.com/p/twitter-api/issues/list
> > Change your membership to this group:
> >http://groups.google.com/group/twitter-development-talk

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Stream API responds with 401 when multiple keywords are used

2010-10-15 Thread Corey Wallis
Hi Tom,

Would you have an example of some values before and after they are
encoded?

It would help me in looking for where the error is.

With thanks.

-Corey

On Oct 15, 11:20 pm, Tom van der Woerdt  wrote:
> I'd assume that there would be an error in your signature generation.
> Make sure that you properly url-encode all values before putting them in
> your base string. Make sure to encode only the correct ones.
>
> If you've checked this and it still does not work, please show us the
> Base String which you use to generate the signature.
>
> Tom
>
> On 10/15/10 3:40 AM, Corey Wallis wrote:
>
>
>
> > Hi All,
>
> > I have working code that uses OAuth to connect to the Stream API and
> > filter using keywords. When I supply a single keyword the API works as
> > expected and tweets are returned. What is odd is that when I specify
> > multiple keywords, or keywords that include a # symbol I get a 401
> > UNAUTHORIZED error.
>
> > Has anyone seen this before and come up with a successful resolution?
>
> > I've captured the HTTP headers of both a successful and unsuccessful
> > call and I can't see anything that is different other than the list of
> > tracks contains multiple entries. Samples of the headers is below.
>
> > This works:
>
> > POST /1/statuses/filter.json HTTP/1.1
> > Authorization: OAuth oauth_token="###", oauth_consumer_key="###",
> > oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
> > oauth_timestamp="1287106462", oauth_nonce="-1686656262164231601",
> > oauth_signature="###"
> > Content-Length: 13
> > Content-Type: application/x-www-form-urlencoded
> > Host: stream.twitter.com
> > Connection: Keep-Alive
> > User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
> > Expect: 100-Continue
>
> > HTTP/1.1 100 Continue
>
> > track=twitter
>
> > This does not:
>
> > POST /1/statuses/filter.json HTTP/1.1
> > Authorization: OAuth oauth_token="###", oauth_consumer_key="###",
> > oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
> > oauth_timestamp="1287105193", oauth_nonce="-3374947181315671264",
> > oauth_signature="###"
> > Content-Length: 20
> > Content-Type: application/x-www-form-urlencoded
> > Host: stream.twitter.com
> > Connection: Keep-Alive
> > User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
> > Expect: 100-Continue
>
> > HTTP/1.1 100 Continue
>
> > track=twitter,lolcat
>
> > Any thoughts would be gratefully received.
>
> > With thanks.
>
> > -Corey

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk