我一直试图在我的墙上上传照片,并使用c#构建的桌面应用程序将其公开,我正在使用codeplex制作的C#SDK facebook。
这是我正在关注的教程
http://www.codeproject.com/KB/miscctrl/csharp_facebook_301.aspx
我能够在墙上发布消息, 现在我想将我的PC硬盘上的图像发布到facebook
这就是我正在做的事情
try
{
attachment att = new attachment
{
name = "", // Name of link
href = "", // URL of link
caption = "",
media = new List<attachment_media>()
};
attachment_media_image attMEd = new attachment_media_image
{
// Image source
src = @"C:\Users\Administrator\Desktop\Photo0250.jpg",
href = "" // URL to go to if clicked
};
att.media.Add(attMEd);
action_link a = new action_link
{
text = "What's this",
href = "" //URL to go to if clicked
};
IList<action_link> tempA = new List<action_link> { a };
// Use the typed friend UID to publish the typed message
MessageBox.Show("Trying to upload");
facebookService1.Stream.Publish("Testing 123", att, tempA, "", id);
有人还可以解释stream.publish函数
中最后2个参数的含义long uid和string target_id有什么区别?