Facebook friends.get API returning error code 13

Hi,

I am using the attached code to render list of friends of a given user:

I see the following error in Firebug debug console:

{"error_code":13,"error_msg":"The underlying FQL query made by this API call has encountered the following error: Parser error: unexpected '[' at position 45.","request_args":[{"key":"method","value":"friends.get"},{"key":"flid","value":"[]"},{"key":"api_key","value":"xxxxx"},{"key":"format","value":"JSON"},{"key":"call_id","value":"699"},{"key":"v","value":"1.0"},{"key":"session_key","value":"2.wWHNk1o6hvgtGWJ3IGRpEA__.3600.1271815200-100000694676107"},{"key":"ss","value":"1"},{"key":"sig","value":"7191ec0be39dfc0f2f75a45398a83c61"}]}

API failed with error code = 13

Anybody else faced the same issue? Any known workarounds?

Thanks,
venustus.
var api = FB.Facebook.apiClient;
            // require user to login
            FB.Connect.requireSession(function(exception) {
                FB.FBDebug.logLevel = 1;
                FB.FBDebug.dump("Current user id is " + api.get_session().uid);
                // Get friends list
                api.friends_get(new Array(), function(result, exception) {
                    var markup = "";
                    var num_friends = result ? Math.min(10, result.length) : 0;
                    if (num_friends > 0) {
                        for (var i = 0; i < num_friends; i++) {
                            markup +=
                                    '<fb:profile-pic size="square" uid="'
                                    + result[i]
                                    + '" facebook-logo="true">'
                                    + ' </fb:profile-pic>';
                        }
                    }
                    document.getElementById("facebookContacts").innerHTML = markup;
                    FB.XFBML.Host.parseDomElement(document.getElementById("facebookContacts"));
                });
            });

Open in new window

venkat_pedapatiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

venkat_pedapatiAuthor Commented:
Problem got solved by using null in place of the first argument in friends_get().
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.