i am using facebook fql to get users mailboxes.
following query returns all the values.
SELECT message_id, thread_id, author_id, body, created_time, attachment,
viewer_id FROM message WHERE thread_id = <thread_id>
I want to get the auther_name and viewer_name.
right now i am using this trick to get names from ID’s but its very slow, because first i have to get the messages and then parse the response to get the names.
function getName($id)
{
$facebookUrl = "https://graph.facebook.com/".$id;
$str = file_get_contents($facebookUrl);
$result = json_decode($str);
return $result->name;
}
Please help me how can i get the name when getting messages using FQL.
Use fql multiquery: https://developers.facebook.com/docs/reference/rest/fql.multiquery/