开发者

Facebook api returned comment id

开发者 https://www.devze.com 2023-03-24 01:22 出处:网络
Whenever I submit a comment to facebook, it returns the id in this format: {\"id\":\"1178215146_2开发者_StackOverflow中文版244093420005\"}

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

精彩评论

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