Esempio n. 1
0
 private void BtnGetToken_Click(object sender, EventArgs e)
 {
     twitterController.GetToken(tbPin.Text);
 }
Esempio n. 2
0
        public static async Task <HttpServiceResult <Type> > GetTwitterDataFromServiceWithToken <Type>(string queryString)
        {
            HttpServiceResult <Type> hts = new HttpServiceResult <Type>();
            HttpClient client            = new HttpClient();

            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", TwitterController.GetToken());
            HttpResponseMessage response = await client.GetAsync(queryString);

            SetHttpServiceResult(hts, response);
            return(hts);
        }