如何上传图片到Picasa网络相册

本文关键字:Picasa 网络相册 | 更新日期: 2023-09-27 18:09:57

谁能告诉我如何上传图片到Picasa网络相册。我的代码如下

        string file = "/data/data/Online_Mix.Online_Mix/files/Testing.jpg";
         string username = _userName;
        PicasaService oService = new PicasaService("web-application-study");
        oService.setUserCredentials(username,_password);

            System.IO.FileInfo fileInfo = new System.IO.FileInfo(file);
        System.IO.FileStream fileStream = fileInfo.OpenRead();
        Uri postUri = new Uri(PicasaQuery.CreatePicasaUri(_userId, "default"));
            PicasaEntry entry = (PicasaEntry)oService.Insert(postUri, fileStream, "Image/jpg", file);
        PhotoAccessor pa = new PhotoAccessor(entry);
        fileStream.Close();

        HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.google.com/accounts/CLientLogin");
        request.ContentType = "application/x-www-form-urlencoded";
        request.Method = "POST";
        request.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallbackItem), request);
        auto.WaitOne();

调试时,在PicasaEntry显示异常"执行身份验证请求返回意外结果:404"。谁来帮我解决这个问题.....

如何上传图片到Picasa网络相册

Google Data的弃用方法。您需要迁移到新的API