Hey Guys,
we are trying to use azure websites as an backend for our app. The app is using Facebook OAuth for user authentication.
We are using the official PHP-SDK provided by facebook
Here is our code:
$facebook = new Facebook($config);
$facebook->setAccessToken($params["fbtoken"]);
$fbUser = $facebook->api("/me");
logMsg("Handle registration");
$facebook->setAccessToken($params["fbtoken"]);
$fbUser = $facebook->api("/me");
$sql="SELECT * FROM bq_users WHERE fb_id='".mysql_real_escape_string($fbUser["id"])."'";
logMsg($sql);
...
When we run the script on our local maschines or on our webserver, the "/me"-requests takes about 200ms.
Log:
{"time":1385555609.7717,"offset":0.0001,"msg":"Handle registration"}
{"time":1385555610.2586,"offset":0.4869,"msg":"SELECT * FROM X WHERE fb_id='XXX'"}
On Azure we experience way more than 3 seconds.
Log:
{"time":1385555673.3911,"offset":0.0001,"msg":"Handle registration"}
{"time":1385555676.8602,"offset":3.4691,"msg":"SELECT * FROM bq_users WHERE fb_id='XX'"}
Any ideas how to fix that