A
A
artemkaw2017-06-18 21:04:14
In contact with
artemkaw, 2017-06-18 21:04:14

C# (WinForms) - How to save authorization data (VkNet)?

Recently I started to study VkNet, I did authorization - successfully, but it was necessary to make sure that authorization was in all forms, that is, if a person authorized in a form special for authorization, he did not need to authorize in others, and those forms performed the necessary VK API functions. Here is the code:

VkApi Vk = new VkApi();
    public void button1_Click(object sender, EventArgs e)
    {
        ulong appID = ...;
        string login = textBox3.Text;
        string password = textBox4.Text;
        Settings settings = Settings.All;


        Vk.Authorize(new ApiAuthParams
        {
            ApplicationId = appID,
            Login = login,
            Password = password,
            Settings = settings,
        });
    }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question