可能重复:
在 php 中解析 Json
我一直在寻找这个遮阳篷但找不到它......所以这是问题
如何从https://graph.facebook.com/XXXXXXX获取信息到 vars,从这里:
{
"id": "XXXXXXX",
"name": "Ricardo Capistran",
"first_name": "Ricardo",
"last_name": "Capistran",
"username": "richycapy",
"gender": "male",
"locale": "es_LA"
}
进入这个变量:
$id, $name, $firstname, $lastname, $username, $gender, $locale