John,

Thanks for the confirmation. I took a closer look at what I was sending in
my query, and figured it out. I was including my POST variables, but I
forgot to send the header for "Content-Type:
application/x-www-form-urlencoded"! After I started sending that header, I
saw the lengths in my stream. I got lengths both for the initial friend's
list, as well as each message after that.

Thanks!
-James

On Fri, Feb 18, 2011 at 10:09 AM, John Kalucki <j...@twitter.com> wrote:

> Delimited=length works with User Streams. Perhaps you have a typo.
>
> -John Kalucki
> http://twitter.com/jkalucki
> Twitter, Inc.
>
>
> On Wed, Feb 16, 2011 at 6:00 PM, WushuJames <wushuja...@gmail.com> wrote:
>
>> Hi,
>>
>> I'm playing around with User Streams. I was able to connect to
>> https://userstream.twitter.com/2/user.json authenticated via OAuth and
>> can see data coming in.
>>
>> I'm having trouble getting delimited=length working with User Streams. Or
>> rather, I'm not sure if I'm using it correctly. I'm doing a POST and passing
>> delimited=length in the body of my post.
>>
>> Here's what I see when I connect:
>> 1) First, a list of friends as documented at
>> http://dev.twitter.com/pages/user_streams, followed by \r\n
>> Example:
>>
>> {"friends":[1497,169686021,790205,15211564,37784836,821958,14884312,92015003,822571,63846421...]}\r\n
>>
>> 2) Next, an "empty" line containing \r\n
>>
>> 3) the messages. The messages are JSON, and the line ends in \r\n. For
>> example, I see:
>> { ...somejson... }\r\n
>> { ...somejson... }\r\n
>> { ...somejson... }\r\n
>>
>> Is delimited=length supposed to work with user streams? Am I passing in
>> the parameter correctly? (as POST variables in the body) Should I be passing
>> delimited=length as GET variables in the URL? That didn't seem to work
>> either, my request got rejected with a 401 HTTP error.
>>
>> Thanks,
>> -James
>>
>>  --
>> 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 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

Reply via email to