Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi , can anyone please help me about how to upload image to Picasa Web Albums . My code is like below


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();


While debugging this it shows exception "Execution of authentication request returned unexpected result: 404" at PicasaEntry . Anyone please help me for solving this.....
Posted
Comments
Frank Lindecke 27-Aug-15 4:07am    
Perhaps https://groups.google.com/forum/#!topic/google-picasa-data-api/tNL4TeNP6fI or http://stackoverflow.com/questions/30469058/google-gdata-client-gdatarequestexception-authentication-suddenly-fails-in-old would help you.
FYI: I have just googled your failure message ;-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900