public void PostActivity(Activity activity)
        {
            YammerRequest yr = this.CreateRequest();

            yr.EndPoint = YammerEndPoint.Activity;

            ActivityUpdate au = new ActivityUpdate();

            au.Activity = activity;

            yr.Method      = "POST";
            yr.ContentType = "application/json";
            yr.BeginInit();

            Stream content = yr.GetRequestStream();

            DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(ActivityUpdate), this.Settings);

            serializer.WriteObject(content, au);



            Stream responseStream = yr.GetResponseStream();

            StreamReader sr = new StreamReader(responseStream);

            String body = sr.ReadToEnd();
        }
        public void PostMessage(String messageContent)
        {
            YammerRequest yr = this.CreateRequest();

            yr.EndPoint = YammerEndPoint.Messages;

            String contentString = @"
{
  ""body"": """ + messageContent + @"""                
}
";

            yr.Method      = "POST";
            yr.ContentType = "application/json";
            yr.BeginInit();

            Stream content = yr.GetRequestStream();

            using (StreamWriter sw = new StreamWriter(content))
            {
                sw.Write(contentString);
            }

            Stream responseStream = yr.GetResponseStream();

            StreamReader sr = new StreamReader(responseStream);

            String body = sr.ReadToEnd();
        }