Restartit Fbapp
Restartit Fbapp

Reputation: 81

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.....

Upvotes: 5

Views: 4893

Answers (2)

sakibmoon
sakibmoon

Reputation: 2032

sometime it works but for some pages it returns me the error

Have you checked your permission? You may not be allowed to request that information.

Upvotes: 3

AboQutiesh
AboQutiesh

Reputation: 1716

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

Upvotes: 6

Related Questions