var client_id = <<My Client ID >>; var client_secret = <<My Client Secret>>; string redirectURI = WebAuthenticationBroker.GetCurrentApplicationCallbackUri().ToString(); string loginURI = "https://www.yammer.com/dialog/oauth?client_id=" + client_id + "&redirect_uri=" + redirectURI; var result = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, new Uri(loginURI), new Uri(redirectURI)); if (result.ResponseStatus == WebAuthenticationStatus.Success) { var response = result.ResponseData; string[] keyValPairs = response.Split('='); HttpClient client = new HttpClient(); string url = "https://www.yammer.com/oauth2/access_token.json?client_id=" + client_id + "&client_secret=" + client_secret + "&code=" + keyValPairs[1]; HttpResponseMessage JSONresponse = await client.GetAsync(url); string content = await JSONresponse.Content.ReadAsStringAsync(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)