标签: sharpsquare

如何在Web API中使用C#获取Foursquare OAuth请求代码?

我正在使用SharpSquare进行Foursquare API的C#建模,我在第1步陷入困境.

  1. 从Foursquare获取"代码"
  2. 根据返回网址和"代码"获取访问令牌
  3. 查询API

SharpSquare文档显示了这一点:

if (Request["code"] != null) {
    sharpSquare.GetAccessToken(redirectUri, Request["code"]);
    ...
}
else {
    HyperLink.NavigateUrl = sharpSquare.GetAuthenticateUrl(redirectUri);
}
Run Code Online (Sandbox Code Playgroud)

我正在尝试从ASP.NET Web API方法中查询Foursquare API .我不能这样做: HyperLink.NavigateUrl = sharpSquare.GetAuthenticateUrl(redirectUri);

我该怎么做才能获得"代码"?(我已经尝试了各种WebClient()和WebRequest/WebResponse尝试,只是不能让它工作).

c# foursquare asp.net-web-api sharpsquare

0
推荐指数
1
解决办法
1298
查看次数

标签 统计

asp.net-web-api ×1

c# ×1

foursquare ×1

sharpsquare ×1