Handling big user IDs returned by FQL in PHP

后端 未结 6 2204
时光说笑
时光说笑 2020-11-29 09:30

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 n

6条回答
  •  孤街浪徒
    2020-11-29 09:44

    Quick and dirty, seems to work for now :

    $sJSON = preg_replace('/:(\d+)/', ':"${1}"', $sJSON);
    

提交回复
热议问题