Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Upload image to Picasa Web Albums

AshokNagAshokNag USMember
edited August 2015 in Xamarin.Android

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 .

Posts

  • AshokNagAshokNag USMember
    edited August 2015

    Still now i'm not getting answer , anyone please help me for solving this.....

Sign In or Register to comment.