Agreed that the problem isn't Twitter's fault. But a basic feature like cursor should work in a language as popular as PHP. Not so much in principle but in practice.
Has anyone tried PEAR's Services_JSON? I haven't tried nor looked at the source. It's also slower than the native json_* functions but that may or may not be an issue. On Sep 24, 6:52 am, Joseph Cheek <[email protected]> wrote: > To be fair to Twitter, the problem lies in PHP's json_decode() function, > not the twitter API. > > Joseph Cheek > [email protected],www.cheek.com > twitter:http://twitter.com/cheekdotcom > > Dewald Pretorius wrote: > > Chad, > > > Shouldn't Twitter be providing an API that works for everyone? > > > From what you said it sounds as if you're saying, "Tough. If you want > > to consume the API with PHP, either run your stuff on a 64-bit > > machine, or scrape the raw JSON output and make it so that it works > > for you." > > > That doesn't sound right. > > > Dewald > > > On Sep 24, 1:02 am, Chad Etzel <[email protected]> wrote: > > >> Hello, > > >> As Joseph points out, PHP on a 64-bit system can handle these numbers. > > >> If you really want this data as a string, you could write a regex in > >> PHP to alter the json string to wrap the digits in quotes before > >> sending it through json_decode(), but that would be a pretty gnarly > >> kludge. > > >> -Chad > > >> On Wed, Sep 23, 2009 at 10:28 PM, Dewald Pretorius <[email protected]> > >> wrote: > > >>> All that Twitter needs to do to solve this problem is to build the > >>> JSON out with next_cursor and previous_cursor as string values. > > >>> I.e., the JSON data should contain: > > >>> "next_cursor":"12398712981212987","previous_cursor":"-12398712981212987" > > >>> I don't know what it will do to Java apps, but for PHP apps it will > >>> solve the problem. > > >>> Dewald
