将照片上传到墙上时出现ArgumentNullException

时间:2012-10-16 21:35:14

标签: c# facebook-c#-sdk

将照片上传到用户的墙上时,我收到了ArgumentNullException,参数“stream”

var fb = new FacebookClient();

fb.PostCompleted += (o, e) =>
{
    ...
};

dynamic parameters = new ExpandoObject();
parameters.access_token = accessToken;
parameters.message = "test efesur";
var mediaObject = new FacebookMediaObject
      {
          ContentType = "image/png", 
          FileName = "mifoto.png"
      };
mediaObject.SetValue(photo);
parameters.source = mediaObject;

fb.PostAsync("me/photos", parameters);

我错过了什么?

1 个答案:

答案 0 :(得分:0)

根据these questions,当API由于各种原因无法处理您的请求时,您会收到该错误。