Platinum Partner

Using Google's API To Access Picasa Albums

Google provides its API in multiple languages. Here is an example that shows how to access a picasa album.

Before you start, you need to download Google's API for .NET. Then copy the files to you project (in the project explorer) in Visual Studio and in the references in the project explorer. Now you can make use of the namespaces:

using Google.GData.Client;
using Google.GData.Photos;


namespace GetPicasaFeed
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.getAtomFeed();
            return;
        }

        private void getAtomFeed()
        {

            // Album query and picasa query are specialized atomfeed classes
            AlbumQuery aQuery = new AlbumQuery(PicasaQuery.CreatePicasaUri("saschatayefeh"));
            PicasaService pService = new PicasaService("PicasaDemo");
            AtomFeed kResultFeed = pService.Query(aQuery);

            foreach (AtomEntry entry in kResultFeed.Entries)
            {
                this.textBox1.AppendText(entry.Title.Text + "\r\n");
                foreach (AtomLink eLink in entry.Links)
                {
                    this.textBox1.AppendText("  " + eLink.HRef.ToString() + "\r\n"); ;
                }
            }
            return;
        }

 
    }
}
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}