我沒有得到文檔說的結果。我登錄了好友;創建應用程序複製此網址並分配給網址字符串;當我執行程序時,我沒有得到預期的結果(狀態+ Accesstoken),如文檔所述。任何人都可以請告訴我,如果我錯過了一些新手到http調用。它在http請求者上運行,但不在Poster firefox插件上運行!rest api沒有給出預期的結果
文檔 http://dev.buddyplatform.com/Home/Docs/Getting%20Started%20-%20REST/HTTP?
代碼
字符串參數= 「{APPID: 'XXXXXX',的AppKey: 'XXXXXXX',平臺: 'REST客戶端'}」;
private async void SimpleRequest()
{
HttpWebRequest request = null;
HttpWebResponse response = null;
try
{
request = (HttpWebRequest)WebRequest.Create(url);
request.Accept = "application/json";
request.ContentType = "application/json";
request.Method = "POST";
StreamWriter sw = new StreamWriter(await request.GetRequestStreamAsync());
sw.WriteLine(parameters);
sw.Close();
response = (HttpWebResponse) await request.GetResponseAsync();
}
catch (Exception)
{ }
}
感謝您的回覆@Pak;我也在firefox插件中獲得令牌。但它沒有代碼。你能看到我的代碼或給我一些其他的代碼可以做http請求嗎?我會非常感謝你! – user3102858
它在http請求者上運行,但不在海報附加組件 – user3102858
那麼你必須使用他們的C#SDK至少加載應用程序參數,否則我認爲你的代碼很好。 – Pak