flickr-downloadr / flickr-downloadr-gtk

A cross-platform desktop app, written in Mono that would download (all or selected) photos from your photostream in their selected size along with their description, title and tags.
https://flickrdownloadr.com/
MIT License
177 stars 41 forks source link

How to use your secrects.cs.in file? #82

Closed HardySoftware closed 3 years ago

HardySoftware commented 5 years ago

I assume you used it to produce actual secrects.cs from it, but how?

Thanks

floydpink commented 5 years ago

You'd need to create an API Key from flickr - using this guide: https://www.flickr.com/services/developer/api/

That will give you the raw/unencrypted values for ConsumerKey and ConsumerSecret - these cannot applied into Secret.cs yet (we need to encrypt them using a SharedSecret).

The SharedSecret is just a random string (with alphanumeric characters) and use that as the CryptKey within this unit test to generate the encrypted values for your flickr API key (ConsumerKey and ConsumerSecret) and update those into Secret.cs which should look like this:

namespace FloydPink.Flickr.Downloadr.Bootstrap
{
    public static class Secrets
    {
        // a random secret string
        public const string SharedSecret = "";

        // your API key from flickr, encrypted using the "shared" secret above
        public const string ConsumerKey = "";

        // your API secret from flickr, encrypted using the "shared" secret above
        public const string ConsumerSecret = "";
    }
}
HardySoftware commented 5 years ago

Thanks a lot for the explanation - I figured out the key and secret from Flickr developer Api portal. The missing piece is shared secret.

I am wondering if you include code comments in this file just as you described, it will make everyone easy to grasp :-)

Cheers!

floydpink commented 5 years ago

Great idea, @HardySoftware - would you like to create a pull request with this change? :)