【发布时间】:2015-06-11 06:10:14
【问题描述】:
我需要一些帮助,我尝试在我的应用程序(Windows 窗体)中获取 instagram api 但没有成功。我的代码是这样的:
using (var wb = new WebClient())
{
var data = new NameValueCollection();
data["client_id"] = "client_id";
data["client_secret"] = "client_secret";
data["username"] = "user"
data["password"] = "pass"
data["grant_type"] = "password";
var response = wb.UploadValues("https://api.instagram.com/oauth/access_token", "POST", data);
string json = System.Text.Encoding.ASCII.GetString(response);
但运行后给我错误:
{
"code": 400,
"error_type": "OAuthException",
"error_message": "This client is not xAuth enabled"
}
【问题讨论】:
-
我已经编辑了你的标题。请参阅“Should questions include “tags” in their titles?”,其中的共识是“不,他们不应该”。
-
您是否阅读过有关 instagram API 的任何文档?