【发布时间】:2011-03-27 20:29:49
【问题描述】:
我为 facebook 编写了一个应用程序,但我无法将图像上传到我创建的相册, 代码在下面,感谢您的帮助。
Facebook.FacebookAPI api = new Facebook.FacebookAPI(GetAccessToken());
Dictionary<string, string> album = new Dictionary<string, string>();
album.Add("name", "Test Album");
album.Add("message", "Message here!");
JSONObject result = api.Post("me/albums", album);
string AlbumId = result.Dictionary["id"].String;
Dictionary<string, string> photo = new Dictionary<string, string>();
photo.Add("message", "test Message");
photo.Add("source", "tgw.jpg");
JSONObject photoResult = api.Post("/" + AlbumId + "/photos", photo);
【问题讨论】:
标签: asp.net facebook-graph-api facebook-c#-sdk