我已经安装了 facebook sdk
现在我可以使用下面的代码像这样发布到墙上
发布上述消息的代码
FacebookClient myClient = new FacebookClient(srAcceToken);
var dicParams = new Dictionary<string, object>();
dicParams["message"] = "trial message";
dicParams["caption"] = string.Empty;
dicParams["description"] = string.Empty;
dicParams["name"] = "deneme 123";
dicParams["req_perms"] = "publish_stream";
dicParams["scope"] = "publish_stream";
dicParams["access_token"] = srAcceToken;
var publishResponse = myClient.Post("/" + srPageId + "/feed", dicParams);
现在当我想发布图像时出现问题。当我使用下面的代码发布时,我得到了这张图片
获得上述结果的代码
var mediaObject = new FacebookMediaObject
{
ContentType = "image/jpeg",
FileName = "pokemon.jpg"
}.SetValue(File.ReadAllBytes(Imagepath));
FacebookClient myClient = new FacebookClient(srAcceToken);
var dicParams = new Dictionary<string, object>();
dicParams["message"] = "trial message";
dicParams["caption"] = string.Empty;
dicParams["description"] = string.Empty;
dicParams["name"] = "deneme 123";
dicParams["req_perms"] = "publish_stream";
dicParams["scope"] = "publish_stream";
dicParams["source"] = mediaObject;
dicParams["type"] = "normal";
dicParams["access_token"] = srAcceToken;
var publishResponse = myClient.Post("/" + srPageId + "/photos", dicParams)
但我想发布如下图片 - 我该怎么做?
c# 4.5 - 使用最新的 facebook sdk 谢谢