I want to connect to yammer with OAuth 2 Server & Client-Side Flow . I read it in the https://developer.yammer.com/docs/oauth-2 site but I didn't understated how to do it in C#
Can some body give me the code in c# that makes the connection .
string bearer = 'abcdefrg234'
string url = "https://www.yammer.com/api/v1/groups/"; // any endpoint
HttpWebRequest request;
request = (HttpWebRequest)WebRequest.Create(url);
request.Headers.Add("Authorization", "Bearer " + bearer);
request.Timeout = 90000;
request.Proxy = new WebProxy() { UseDefaultCredentials = true };
using (WebResponse response = (HttpWebResponse)request.GetResponse())
{
using (Stream responseStream = response.GetResponseStream())
{
XDocument XMLDoc = XDocument.Load(responseStream);
//To Do: use XMLDoc
}
}