CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Saturday, September 02, 2006

Create an Instance of Flickr in C#

Create an Instance of Flickr

First, let's create a simple Flickr object, passing in your API key obtained above.

Visual C#

string apikey = "1234abcd1234abcd";
Flickr flickr = new Flickr(apikey);

Visual Basic

Dim apikey As String = "1234abcd1234abcd"
Dim f As Flickr = New Flickr(apikey)

From this instance of the Flickr object you can perform searches, browse groups, find users, and perform the steps required to authenticate a user (provided you provide the Shared Secret as well).

Find Those Photos

The following line of code searches all Flickr photos for photos with the tag "microsoft":

Visual C#

PhotoSearchOptions searchOptions = new PhotoSearchOptions();
searchOptions.Tags = "microsoft";
Photos microsoftPhotos = flickr.PhotosSearch(searchOptions);
Coninue….

Post a Comment