0
這是我第一天嘗試使用PHP的FQL。我嘗試了以下代碼來檢索用戶的會話詳細信息。我成功地將郵件與發件人ID一起打印出來。在那裏我想打印用戶名和用戶名。打印fql多查詢結果
$fql = array(
"query1"=>"select thread_id,body,author_id from message where thread_id in (select thread_id from thread where folder_id=0 and viewer_id = me() LIMIT 3) LIMIT 50",
"query2"=>"SELECT uid, name, username, pic_square, current_location, profile_url FROM user WHERE uid IN (SELECT author_id FROM #query1)"
);
$user_profile = $facebook->api(array(
'method' => 'fql.multiquery',
'queries' => $fql,
));
//$msg = $user_profile[0]['fql_result_set'];
//$user = $user_profile[1]['fql_result_set'];
echo '<pre>';
print_r($user_profile);
echo '</pre>';
上面$ user_profile變量保持具有2個索引[1味精等爲用戶細節] JSON字符串。如何使用用戶名,而不是用戶ID一起打印在郵件正文