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?)
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.
And I would always recommend using an app. Its better to get your app blocked in case something goes wrong instead of IP.