Link to home
Start Free TrialLog in
Avatar of venkat_pedapati
venkat_pedapati

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of venkat_pedapati
venkat_pedapati

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial