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一起打印在邮件正文