• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 859
  • Last Modified:

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

0
venkat_pedapati
Asked:
venkat_pedapati
1 Solution
 
venkat_pedapatiAuthor Commented:
Problem got solved by using null in place of the first argument in friends_get().
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now