Authorizing the Flickr protocol
We will use the flapi
module to communicate with Flickr. It provides access to the API methods. Most large-scale companies implement some level of authorization. In other words, we can't just make a request and upload/retrieve data. We need to sign in our requests with access tokens or provide credentials during the process. Flickr uses OAuth (1.0 specification), a type of standard for such operations. OAuth is an open standard for authorization and defines a method for clients to access server resources. Let's check the following diagram and see how Flickr's OAuth mechanism works:
Almost the entire process is wrapped in the flapi
module. What we should remember here is that we need a Key and Secret to retrieve an access token. The same token will be used later when uploading the images.
Obtaining your application's Key and Secret
To create our own application's Key and Secret, we must have a valid Flickr account first. Next, log in and navigate to http://www...