Handling big user IDs returned by FQL in PHP

Posted by ggambett on Stack Overflow See other posts from Stack Overflow or by ggambett
Published on 2010-05-25T19:20:24Z Indexed on 2010/05/25 19:21 UTC
Read the original article Hit count: 303

Filed under:
|
|
|

I'm using FQL to retrieve a list of users from Facebook. For consistency I get the result as JSON. This causes a problem - since the returned JSON encodes the user IDs as numbers, json_decode() converts these numbers to floating point values, because some are too big to fit in an int; of course, I need these IDs as strings.

Since json_decode() does its own thing without accepting any behavior flags, I'm at a loss. Any suggestions on how to resolve this?

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook