[twitter-dev] Re: delimited (streaming API) now default?
Ahh! Yes, that is exactly what was happening. I am using a http client library but accidentally bypassed the "dechunker" code and started reading from its raw stream without realizing I was doing so. Thanks very much! On Nov 30, 11:28 am, "@epc" wrote: > On Nov 29, 12:07 pm, Matt Harris wrote: > > > What I did notice is that 0x6EF = 1775 and 0x710 = 1808 -- in both cases the > > Hex values are 6 bytes longer than the object we are returning. > > This came up in March, > see:http://groups.google.com/group/twitter-development-talk/msg/69131a43f... > Net: it appears that the client is consuming the stream raw and not > decoding the chunked transfer encoding. > -- > -ed costello -- 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] delimited (streaming API) now default?
It appears to me that when using the statuses/filter streaming API method, elements are not length-delimited by default, even if you don't specify "?delimited=length". And if you DO add "? delimited=length", you get double length fields. For example: if I query http://stream.twitter.com/1/statuses/filter.json, I get something like: 64B { } 731 { } If, on the other hand, I query http://stream.twitter.com/1/statuses/filter.json?delimited=length, I get something like: 6EF 1769 { } 710 1802 { } So its passing me a length in hex, and then a length in decimal, and then the actual status update. It sure seems like 'delimited=length' is redundant now. But was this API change ever documented? I can't find any announcements about it and the dev docs still describe the old format. thanks! -- 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] streaming API help (regular API works)
Hi - I hope I am not posting a question that has previously been answered - I tried searching the archives but to no avail. I am trying to get the 'sample' stream API working but am getting 401 Unathorized errors. For debugging purposes, I am using curl for now. The following command fails (401): curl 'http://stream.twitter.com/1/statuses/sample.json? delimited=length' -H 'Authorization: OAuth realm="Twitter API", oauth_nonce="24599946", oauth_timestamp="1281319798", oauth_consumer_key="", oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_token="175905996- JkrGAl8ZXCgIjeZl3o7fMCD8HbyfVeDbkP9Y13mX", oauth_signature="i %2BVzWX23sp5t8%2Fz0swJl%2FDHloOo%3D"' However, I believe that my OAuth stuff is (hopefully) correct because the following command works, where I have reused the exact same OAuth header (all I changed was the URL): curl 'http://api.twitter.com/1/statuses/user_timeline.json' -H 'Authorization: OAuth realm="Twitter API", oauth_nonce="24599946", oauth_timestamp="1281319798", oauth_consumer_key="", oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_token="175905996-JkrGAl8ZXCgIjeZl3o7fMCD8HbyfVeDbkP9Y13mX", oauth_signature="i%2BVzWX23sp5t8%2Fz0swJl%2FDHloOo%3D"' So what does this mean? Are the authentication requirements at all different for these two API calls? In case its relevant, note that I am using my account's "single access token" to create these OAuth signatures as opposed to a "real" customer key/secret pair. Any suggestions on what else I can do to try and debug this? Many thanks! - Ian