I want to upload photos by code but ı could not accomplish the task using c# can anyone help me PLEASE.
all I want is upload photos and get the url for my pictures so ı can use them in mywebsite. my ERROR İS Execution of request failed: http://picasaweb.google.com/data/feed/api/user/erdsah.ilkon.com/albumid/2001 {"The remote server returned an error: (403) Forbidden."} "Modification only allowed with api authentication." ************ mycode.>>> using System; using System.Collections.Generic; using System.Linq; using System.Text; using Google.GData.Client; using Google.GData.Photos; namespace MyPicasa { class Program { //http://code.google.com/intl/tr-TR/apis/picasaweb/ developers_guide_dotnet.html //http://www.waynejohn.com/post/2008/12/19/Using-Images-For- Your-Social-Links-On-Blogger-Posts.aspx static void Main(string[] args) { PicasaProcessor myPro = new PicasaProcessor(); myPro.imajYukle(); } } public class PicasaProcessor { string kullanıcıAdi = "erdsah.ilkon.com"; string sifre = "qwerty123456"; private Service service; private string authToken; private string albumName = "2001"; private string dosyaPath = "c:\\a.png"; public void imajYukle() { this.service = new Service("GoogleClientLogin"); this.service.setUserCredentials(kullanıcıAdi, sifre); this.authToken = this.service.QueryAuthenticationToken(); Uri postUri = new Uri(PicasaQuery.CreatePicasaUri (kullanıcıAdi, albumName)); System.IO.FileInfo fileInfo = new System.IO.FileInfo (dosyaPath); System.IO.FileStream fileStream = fileInfo.OpenRead(); PicasaEntry entry = (PicasaEntry)service.Insert(postUri, fileStream, "image/jpeg", dosyaPath); fileStream.Close(); } } } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Picasa Web Albums API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Picasa-Data-API?hl=en -~----------~----~----~----~------~----~------~--~---
