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_ms g":"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.ge t"},{"key" :"flid","v alue":"[]" },{"key":" api_key"," value":"xx xxx"},{"ke y":"format ","value": "JSON"},{" key":"call _id","valu e":"699"}, {"key":"v" ,"value":" 1.0"},{"ke y":"sessio n_key","va lue":"2.wW HNk1o6hvgt GWJ3IGRpEA __.3600.12 71815200-1 0000069467 6107"},{"k ey":"ss"," value":"1" },{"key":" sig","valu e":"7191ec 0be39dfc0f 2f75a45398 a83c61"}]}
API failed with error code = 13
Anybody else faced the same issue? Any known workarounds?
Thanks,
venustus.
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_ms
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"));
});
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.