1

到目前为止,我已经尝试过:

$facebook->api('/me', 'get', array("fields"=>"location"));

返回:

Array ( [location] => Array ( [id] => 107847249250173 [name] => Cambridge, Cambridgeshire ) [id] => 1234567890 )

如果我有必要的权限,我怎么能[name]以可以插入数据库的格式回显这个位(所以输出是“剑桥,剑桥郡”)?

4

1 回答 1

2
$data = $facebook->api('/me', 'get', array("fields"=>"location"));
echo $data['location']['name'];
于 2012-12-17T17:49:30.763 回答