开发者

Facebook api returned comment id

Whenever I submit a comment to facebook, it returns the id in this format:

{"id":"1178215146_2开发者_StackOverflow中文版244093420005"}

Do you know how I can get this value out with PHP?


The string you pasted is JSON. Use $arr = json_decode($val, true);. You'll get an associative array, and you can access the value with: $arr['id'].

  • json_decode documentation
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜