在Facebook API中,我有这个数组。
{
"id": "587967941220651",
"about": "",
"can_post": true, ...
我像这样打印了这个数组。
$request = new FacebookRequest( $session, 'GET', '/PAGE_NAME' );
$response = $request->execute();
// get response
$graphObject = $response->getGraphObject()->asArray();
// print profile data
echo '<pre>' . print_r( $graphObject, 1 ) . '</pre>';
在我的网页上,我得到了这个结果。
Array
(
[id] => 587967941220651
[about] =>
[can_post] => 1 ...
而这一次,我有这种阵列。
{
"data": [
{
"id": "1444336682520148_1458726944414455",
"from": {
"id": "1444336682520148",
"name": "James"
},
"story": "James shared Kevin's status update.",
如你所见,有数据&#34;在最前面。我该如何打印这种阵列? 谢谢。