Re: [twitter-dev] Re: Streaming API skips users

2010-09-27 Thread Matt Harris
Hey Ginny,

Thanks for letting us know it was the ruby gem at fault - and for correcting it.
Best
Matt

On Sun, Sep 26, 2010 at 12:17 PM, Ginny Hendry ginnyhen...@gmail.com wrote:

 FYI, we found the bug!  Twitter API was fine, but yajl-ruby gem has an
 error that causes it to skip tweets of some lengths, which accounts
 for the weird way it let some through and not others.

 We're heading off to correct the Ruby gem now.

   -Ginny

 --
 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




-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

-- 
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: Streaming API skips users

2010-09-27 Thread Ginny Hendry

For anyone else who is having this problem, the fix has been
identified but has not yet been published as a new gem version.  What
happens is that it skips some tweets.  The ones it skips are the ones
that happen to have a message length in hex that includes a zero
character so it will seem pretty random which ones get through and
which ones don't.

Here's how to fix it:

First update the gem and see if it is a version later than 0.7.7.  If
it is, you should be OK.  If it's 0.7.7 or earlier, change one line of
code:

Look in the gem source code on your system for the yajl-ruby gem and
find the file lib/yajl/http_stream.rb.

Edit line 151 from
   break if line.match /0.*?\r\n/
to
   break if line.match /^0.*?\r\n/

Adding that one character will correct the error.


-- 
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: Streaming API skips users

2010-09-27 Thread Tim Haines
Thanks for following up with this Ginny.  Brian has just pushed version
0.7.8 of the gem, which fixes this.

Tim.

On Tue, Sep 28, 2010 at 5:16 AM, Ginny Hendry ginnyhen...@gmail.com wrote:


 For anyone else who is having this problem, the fix has been
 identified but has not yet been published as a new gem version.  What
 happens is that it skips some tweets.  The ones it skips are the ones
 that happen to have a message length in hex that includes a zero
 character so it will seem pretty random which ones get through and
 which ones don't.

 Here's how to fix it:

 First update the gem and see if it is a version later than 0.7.7.  If
 it is, you should be OK.  If it's 0.7.7 or earlier, change one line of
 code:

 Look in the gem source code on your system for the yajl-ruby gem and
 find the file lib/yajl/http_stream.rb.

 Edit line 151 from
   break if line.match /0.*?\r\n/
 to
   break if line.match /^0.*?\r\n/

 Adding that one character will correct the error.


 --
 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: Streaming API skips users

2010-09-26 Thread Ginny Hendry

FYI, we found the bug!  Twitter API was fine, but yajl-ruby gem has an
error that causes it to skip tweets of some lengths, which accounts
for the weird way it let some through and not others.

We're heading off to correct the Ruby gem now.

   -Ginny

-- 
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: Streaming API skips users

2010-09-24 Thread Ginny Hendry
John-

Thanks for confirming the way this should work.  We'll work on the
client side code to see what it's doing with the stream data and how
it compares to the raw stream from curl.

  -Ginny


On Sep 24, 12:01 pm, John Kalucki j...@twitter.com wrote:
 Accounts should work all of the time, almost always with very low latency,
 unless they are protected accounts or otherwise filtered from search and
 streaming. Once an account is filtered, it should remain filtered for a very
 long time and not bounce back and forth.

 If you perform the same request with curl, and study the output, do you see
 the data that you expect?

 -John Kaluckihttp://twitter.com/jkalucki
 Twitter, Inc.



 On Thu, Sep 23, 2010 at 8:59 PM, Ginny Hendry ginnyhen...@gmail.com wrote:
  We are new to the Twitter API.  In early stages of testing an app, we
  reading from the streaming API to get tweets for a list of users.  It
  seems to work for some users and not others, and if it fails for one
  or two users today it will work for them tomorrow.

  We are doing a post to this url with four user IDs in the post data in
  the format shown:

  http://username:passw...@stream.twitter.com/1/statuses/filter.json

  follow=111,222,333,444

  We start the stream and then enter tweets manually from several of the
  Twitter accounts.  Some of the accounts work some of the time, that
  is, for some of the accounts the tweets appear in our stream.  If we
  test the same thing later a different selection of accounts work.  We
  haven't seen any pattern.  None of the accounts are set to be private.

  So our question is:  Is this supposed to work?  Are all new tweets
  entered for the four users supposed to appear in the stream within a
  short time?  How can we debug this?

  Any suggestions welcome.  Thanks.

    -Ginny

  --
  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