本文介绍了使用Foursquare API的400错误请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将签到发布到4sq,但仍然收到400错误请求.这是执行签入的非常简单的代码:
I am posting a checkin to 4sq but keep getting 400 Bad Request. Here is a very simple code that does the checkin:
client = new WebClient(); client.UploadStringCompleted += (s, args) => { var result = args.Result; }; client.UploadStringAsync(new Uri("api.foursquare/v2/checkins/add/?oauth_token=my_token"), "POST", "venueId=venue_id");我确定my_token和场所ID是正确的,因为我使用它们来获取以前的签到清单和场所信息.
I am sure my_token and venue_id is correct because I use them for getting list of previous checkins and venue information.
您看到此代码有什么问题吗?
Do you see something wrong with this code?
谢谢.
推荐答案将oauth_token指定为POST参数,而不是URL路径的一部分.
Specify the oauth_token as a POST param, not part of the URL path.
更多推荐
使用Foursquare API的400错误请求
发布评论