2
如何獲取Yammer中的組標識?自動獲取Yammer中的組標識
我能夠在所有的公司發佈的消息,以及特定的組,但我不能夠使用的Yammer的API
找到下面的代碼來獲取特定組的組ID發佈在特定的組中,group_id是一個字符串變量,其值我手動輸入,並且希望自動執行此過程。
private void Post(string address)
{
System.Uri targetUri = new System.Uri(https://www.yammer.com/api/v1/messages.json?body=HelloTest&group_id=[some_number]&access_token=" + token);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(targetUri);
request.Method = "POST";
request.BeginGetResponse(new AsyncCallback(ReadWebRequestCallback), request);
}
// STEP4 STEP4 STEP4
private void ReadWebRequestCallback(IAsyncResult callbackResult)
{
HttpWebRequest myRequest = (HttpWebRequest)callbackResult.AsyncState;
HttpWebResponse myResponse = (HttpWebResponse)myRequest.EndGetResponse(callbackResult);
string results;
using (StreamReader httpwebStreamReader = new StreamReader(myResponse.GetResponseStream()))
{
results = httpwebStreamReader.ReadToEnd();
//TextBlockResults.Text = results; //-- on another thread!
SkyDriveContent test = new SkyDriveContent();
test.Name = results;
str_results = results;
}
myResponse.Close();
}
我看到了文檔,但沒有找到任何方式獲取用戶所屬組的列表?
任何幫助,將不勝感激!