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 6052041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:53:01+00:00 2026-05-23T07:53:01+00:00

While I’m using the Graph API to simple action, like this for example: require

  • 0

While I’m using the Graph API to simple action, like this for example:

require 'src/facebook.php';

# facebook class
$facebook = new Facebook(array(
  'appId'  => 'XXX',
  'secret' => 'XXX',
));

for ($i = 0; $i < 9; $i++)
{
    $url = $facebook->api('/Intel');
    echo $url['name'] . '<br />';
}

(just a quick example, I want to return 9 different pages but it doesn’t matter now)

Well, this action took 9 – 10 SECONDS! too much.. and this is the only acion on the page (you can try run it and see).

What can I do? (if I’m using FQL via api [as method fql.query] it doesn’t improve the running time, I checked it) I have to using graph api.

By the way, I’m using PHP SDK 3.0.1 (newest version.. maybe this is the problem?)

  • 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-05-23T07:53:02+00:00Added an answer on May 23, 2026 at 7:53 am

    Do you realize that you are making a remote call in a loop? It will make several remote calls one by one, thats why its slow. API is damn fast.
    What I would suggest you is to use FQL here and send multiple queries in batch. This way you make one remote call and get data of several queries together.

    /**
     * FQL multiquery
     */
    $multiquery_fql[ 'query1' ] = $query1;
    $multiquery_fql[ 'query2' ] = $query2;
    $multiquery_fql = json_encode( $multiquery_fql );
    $multiquery_result = $facebook->api(array(
        "method"    => "fql.multiquery",
        "queries"     => $multiquery_fql,
        'access_token' => '' // fill a generic token here (granted to app, independent of user)
    ));
    

    And I would always recommend using an app. Its better to get your app blocked in case something goes wrong instead of IP.

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

Sidebar

Related Questions

While requesting a php page from the server using .load() api, or for that
While reading this , I'm confused by the following examples: // Example 2: Explicit
While browsing the source code of the Scala API, I met this package definition
While using boost::threads I have come across this interruption problem. When I do a
While creating classes, I followed OO conventions and declared all class variables before using
While I grew up using MSWindows, I transitioned to my much-loved Mac years ago.
While using Silverlight, if you have a lot of pages, what are the techniques
While making an edit to a class with a long history, I was stymied
While I search this one out on my own, may be some one could
While creating a simple client for a REST service which I have stubbed out,

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.