Exemple #1
0
        public async Task Oauth_RequestToken_OK()
        {
            var pocket = new PocketOauth("consumer_key", "rediret_uri");

            var token = await pocket.GetRequestTokenAsync();

            Assert.AreEqual(30, token.Length);
        }
Exemple #2
0
        private async void LoginPocket_OnClick(object sender, RoutedEventArgs e)
        {
            var token = await _pocketOauth.GetRequestTokenAsync();

            var authorizeUri = _pocketOauth.BuildAuthorizeUri(token);

            StorageHelper.Save("request_token", token);

            var webBrowser = new WebBrowserTask();

            webBrowser.Uri = new Uri(authorizeUri);
            webBrowser.Show();
        }