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

  • SEARCH
  • Home
  • 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 8168745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:37:46+00:00 2026-06-06T20:37:46+00:00

My web app builds a batch request to the Facebook graph API. The batch

  • 0

My web app builds a batch request to the Facebook graph API. The batch is composed by making a first API call to grab the user’s friends. Then I loop over the list of friends and add a specific request for each (with that user’s specific access token) and add each one to the batch. So it ends up being two API calls. Unfortunately, it’s REALLY slow, and I’ve heard the FQL requests are faster.

So my question is, can I do this with FQL? I’ve read the documentation but I can’t figure out how I might return, for example, all the friends of friends’ work history (which requires each friend’s access token) with one single FQL query. Is this possible? Obviously I could build a batch request of FQL requests, but that would leave me back where I started.

UPDATE:
I’ve done some tests and FQL definitely seems to be faster than a batch request. My FQL multiquery looks like this:

$multiQuery = array(
"query1"=>"SELECT uid2 FROM friend WHERE uid1 = me()", //LIST OF FRIEND IDs
"query2"=>"SELECT uid, name, work, education, is_app_user FROM user WHERE uid IN (SELECT uid2 FROM #query1)", //FRIEND PROFILES
"query3"=>"SELECT uid2 FROM friend WHERE uid1 IN (SELECT uid FROM #query2 WHERE is_app_user=1)",
"query4"=>"SELECT uid, name, work, education FROM user WHERE uid IN (SELECT uid2 FROM #query3)"
);

$multiQueryResult = $facebook->api(array(
'method'   => 'fql.multiquery',
'queries'  => $multiQuery
));

var_dump( $multiQueryResult );

The query works but there are two problems:

  1. query3 returns all the user ids, NOT just the ones who’ve authorized
    my app.

  2. query4 doesn’t return the work/education fields… presumably
    because the API request is being called with the current user’s
    access token (as opposed to that of specific user from query3). I’ve stored the authorized users’ access tokens in the DB, but I don’t know if it’s possible to use them in this context.

CAN this be done with FQL?? Can I define unique access tokens within an FQL multiquery?

  • 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-06T20:37:48+00:00Added an answer on June 6, 2026 at 8:37 pm

    This isn’t really an answer to my original question because there doesn’t appear to be one. It seems that at the time of writing this, the Facebook batch request is just really slow… which is too bad since that basically defeats its entire purpose.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a Django web-app which allows a user to build up a set
I'm trying to run a batch file, as another user, from my web app.
I have a Maven/Grails app that almost builds, but fails to find web.xml at
I coded small web app that runs ant (batch file). The processing time of
I want to build a Java web app and deploy it on EC2 .
I was asked to build a web app with the following restrictions: 1) As
Scenario: I build a simple web based app for mobile that needs to interact
I want to build a REST web service on app engine. Currently i have
We are planning a web application to build on Google's App Engine platform. Is
I'm working on a combined web/client app that has branches for production, test, and

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.