too long

I have working on a social networking website. There is an option to login through facebook. When a user click on "Login with Facebook". We are importing his contacts etc. in the database. I am using three different FQL queries to fetch data. 1 is as shown below :

var query1 = FB.Data.query("SELECT name,flid,owner,type from friendlist where owner = me()");
                          query1.wait(function (row) {
                              friends_array = row;
                              strdata = "";
                              for (i = 0; i < row.length; i++) {
                                  strdata += ' {"name": "' + row[i].name + '", "flid": "' + row[i].flid + '","owner": "' + row[i].owner + '", "type": "' + row[i].type + '"} ,'
                              }
                              strdata = strdata.substring(0, strdata.length - 1);
                              var newjson1 = '[' + strdata + ']';
                              $.post('loadfbdata.php', { user_id: userid, email: response.email, jsondata: newjson1, flag: '2' }, function (data) {

                              });

                          });

There are three FQL queries like this and the data returned by each query is stored in database using jQuery post method. How can I run them independently. I mean all three FQL queries should run in background. I should n't w8 for them to "execute for importing contacts in the database" and then redirect to main page. Right now, I am showing loading image for 20sec so that all the three FQL queries can perform their work.

What's the best solution to perform this task ?

One possibility is to "Login with Facebook" as normal without performance those query. Then, use PHP to detect whether this user is logged for the first time, then inject a Javascript to request to import his contact at the background.

<?php if ($no_contact_has_been_imported_from_this_user) { ?>
    $.ajax({
        ...
        url: "import.php",
        ...
    });
<?php } ?>

First of all, Ideally we should not store any friend list of any Facebook user because it may update regularly which causes extra burden on your database.

Or still wanna store then

One thing you can do, After login with facebook and redirect to home page, there you fetch facebook friendlist whether using same FQL or FB.api from Javascript sdk and you store into database from there. With these approach you fire all three queries simultaneously and store them. which reduces your time and user don't have to wait for processing