Possible bug in Status Set with uid specified

Sep 9, 2009 at 4:31 PM
Edited Sep 9, 2009 at 4:33 PM

I was just looking through the source code of status.cs class in the facebook.dll and came across:

        public bool set(long uid, string status)
{
var parameterList = new Dictionary<string, string> { { "method", "facebook.status.set" } };
_api.AddOptionalParameter(parameterList, "uid", uid);
_api.AddOptionalParameter(parameterList, "status", status);

var response = _api.SendRequest(parameterList, uid<=0);
return string.IsNullOrEmpty(response) || status_set_response.Parse(response).TypedValue;
}

The issue with this is if you specify a uid the the useSession in the SendRequest will always evaluate to false,
if you specify an uid you have to send the session key too.(http://wiki.developers.facebook.com/index.php/Status.set)
If this call is made with a uid > 0 you will get the session key was not provided error.

I presume this is a bug?