我使用FQL從Facebook流表中獲取數據,但是,即時通訊有點麻煩,試圖通過數組循環顯示我需要的結果。這裏是我使用的代碼:通過從流表FQL結果循環表
if ($user){
//fql query example using legacy method call and passing parameter
try{
$fql2 = "SELECT app_data
FROM stream
WHERE filter_key in (SELECT filter_key
FROM stream_filter
WHERE
uid=".$user."
AND type='newsfeed')
AND is_hidden = 0";
$param2 = array(
'method' => 'fql.query',
'query' => $fql2,
'callback' => ''
);
$fqlResult2 = $facebook->api($param2);
}
catch(Exception $o){
d($o);
}
}
for ($x=0; $x<200; $x++) {
d($fqlResult2[$x]['app_data']);
}
返回數組是這樣的:
Array
(
[attachment_data] => {"name":"name in here",
"href":"url here",
"description":"desc here",
......etc}
)
我想要做的是從「attachment_data」得到的值,如姓名,HREF .. .etc
有什麼想法?
我想沒有人知道嗎? = o( –