Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7821311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:36:08+00:00 2026-06-02T07:36:08+00:00

i am using facebook fql to get users mailboxes. following query returns all the

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:36:09+00:00Added an answer on June 2, 2026 at 7:36 am

    Use fql multiquery: https://developers.facebook.com/docs/reference/rest/fql.multiquery/

    $queries = array(
        'messages' => 'SELECT message_id, thread_id, author_id, body, created_time, attachment, viewer_id FROM message WHERE thread_id = <thread_id>',
        'users' => 'SELECT name FROM profile WHERE id IN (SELECT author_id FROM #messages)',
    );
    
    $param = array(
        'method'   => 'fql.multiquery',
        'queries'  => json_encode($queries),
        'callback' => ''
    );
    
    try {
        $fqlresult = $facebook->api($param);
    } catch (FacebookApiException $e) {
        echo "EXCEPTION {$e->getMessage()}\n";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Facebook's Facebook Query Language (FQL) to get information on a user
I try to get all user photo by using FQL (Facebook C# SDK, ASP
I'm using the following code to retrieve a user's friends: $fql_query_url = 'https://graph.facebook.com/fql?q=SELECT+uid,+name,+pic_square+FROM+user+WHERE+uid+IN+(SELECT+uid2+FROM+friend+WHERE+uid1+=+me())+order+by+name&access_token=' .
I am trying to get a facebook fql query to work using the browser,
I am using Facebook query language (FQL) to retrieve users dates. My FQL is
I try using FQL Query to fetch count of share from post on facebook
I am making an FQL query using the Facebook PHP API, like so: $stream
I am using fql from facebook and querying user table to get profile_url string
I am using Facebook FQL to get photos and the time when they were
I'm trying to get a list of aid (album ids) using a Facebook Query.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.