【发布时间】:2011-12-23 18:44:44
【问题描述】:
我在谷歌的 api 页面上找不到任何东西,这可能吗?我在网上找不到任何东西
【问题讨论】:
标签: google-api picasa
我在谷歌的 api 页面上找不到任何东西,这可能吗?我在网上找不到任何东西
【问题讨论】:
标签: google-api picasa
当然:您可以使用 C# 或任何其他 .Net 语言上传图片、视频或其他二进制文件:
http://code.google.com/apis/picasaweb/docs/1.0/developers_guide_dotnet.html#PostPhotos** **
这是完整的 GData .Net API:
【讨论】:
希望这将帮助那些试图使用 .NET API 将视频上传到 picasa 的人。
RequestSettings mySettings = new RequestSettings("PROGRAM NAME");
mySettings.Timeout = 600000;
PicasaRequest pr = new PicasaRequest(mySettings);
PicasaService service = pr.Service;
service.setUserCredentials(username, password);
Uri postUri = new Uri(PicasaQuery.CreatePicasaUri(username, picasaalbumid));
PhotoEntry videoEntry = new PhotoEntry();
videoEntry.Title = new AtomTextConstruct(AtomTextConstructElementType.Title,"Untitled.3gp");//I would change this to read the file type, This is just an example
videoEntry.Summary = new AtomTextConstruct(AtomTextConstructElementType.Summary,"");
MediaFileSource source = new MediaFileSource(stream,fileName,fileType);
videoEntry.MediaSource = source;
PicasaEntry entry = service.Insert(postUri,videoEntry);
stream.Close();
【讨论】: