Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graph API: An unknown error occurred while fetching fql multiquries

I have a problem using the PHP SDK:

$fql="{'query1':'SELECT uid2 FROM friend WHERE uid1=me()',
         'query2':'SELECT author_uid FROM checkin WHERE author_uid IN(SELECT uid2 FROM #query1) AND page_id = $page_id'}";

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

And I use plenty page ids.

When I ran this script in https://graph.facebook.com/fql/?access_token=AC&q=QUERIES It works perfect.

But when I use the php-sdk, sometime it works but for some pages it returns me the error:

FacebookApiException Object
(
    [result:protected] => Array
        (
            [error_code] => 1
            [error_msg] => An unknown error occurred
        )

    [message:protected] => An unknown error occurred
    [string:Exception:private] => 
    [code:protected] => 1
    [file:protected] => /APP_PATH/base_facebook.php
    [line:protected] => 1249
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /APP_PATH/base_facebook.php
                    [line] => 816
                    [function] => throwAPIException
                    [class] => BaseFacebook
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [error_code] => 1
                                    [error_msg] => An unknown error occurred
                                )

                        )

                )

Anyone can help me please? I can't figure why I get this error.....

like image 906
Restartit Fbapp Avatar asked Mar 14 '13 13:03

Restartit Fbapp


1 Answers

Sometimes when you make a big calls through the api facebook will return:

An unknown error occurred

AS an example if you make a call to get comments on post with 4000 comments with (limit = 1000) facebook will return the data but if you try (limit = 4000) facebook will return the same error

like image 137
AboQutiesh Avatar answered Dec 20 '22 00:12

AboQutiesh