Navigation Menu

Skip to content

abjerner/Skybrud.Social.Flickr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skybrud.Social.Flickr

Installation

You can download this package from either NuGet (recommended) or download a ZIP file with the neccessary files from here on GitHub:

  1. NuGet Package
    Install this NuGet package in your Visual Studio project. Makes updating easy.

  2. ZIP file
    Grab a ZIP file of the latest release; unzip and move the files to the bin directory of your project.

Found a bug? Have a question?

Documentation

While there currently isn't any documentation available, you will be able to find it in the future at the Skybrud.Social website.

Meanwhile you can have a look at the examples below for getting started:

Usage

Initializing a new OAuth client

The FlickrOAuthClient class is responsible for the raw communication with the Flickr API as well as authentication. The class can be initialized with one of the constructors, or simply by setting the properties like in the examples below.

For accessing the Flickr API just on behalf of your app, you can initialize the FlickrOAuthClient class like:

// Initialize a new OAuth client with information about your app
FlickrOAuthClient oauth = new FlickrOAuthClient {
    ConsumerKey = "Your consumer key here",
    ConsumerSecret = "Your consumer secret here"
};

If you need to access parts of the API that requires user authentication, you should also specify the Token and TokenSecret properties (see the section about Obtaining an access token).

// Initialize and configure the OAuth client
FlickrOAuthClient client = new FlickrOAuthClient {
    ClientId = "Insert your client ID here",
    ClientSecret = "Insert your client secret here",
    Token = "The access token of the user",
    TokenSecret = "The access token secret of the user"
};

As part of OAuth 1.0a, the authentication requires that you specify a consumer key, consumer secret and a callback URL of your app (client). You can create a new app of find your existing apps using one of the links below:



##### Generating the authorization URL / getting an authorization code

Coming soon.



##### Obtaining an access token

Coming soon.



##### Initializing an instance of FlickrService

The FlickrService class must be initialized from an instance of FlickrOAuthClient, since it is really this class that is responsible for making the calls to the API (FlickrService is merely a wrapper for the strongly typed implementation):

// Initialize a new OAuth client with information about your app (and the user)
FlickrOAuthClient client = new FlickrOAuthClient {
    ClientId = "Insert your client ID here",
    ClientSecret = "Insert your client secret here",
    Token = "The access token of the user",
    TokenSecret = "The access token secret of the user"
};

// Initialize a new service instance
FlickrService service = FlickrService.CreateFromOAuthClient(oauth);