问题描述
我正在向4SQ发布一次检查,但请继续获得400个不良要求.这是一个非常简单的代码,可以进行检查:
client = new WebClient(); client.UploadStringCompleted += (s, args) => { var result = args.Result; }; client.UploadStringAsync(new Uri("https://api.foursquare.com/v2/checkins/add/?oauth_token=my_token"), "POST", "venueId=venue_id");
我确定my_token和venue_id是正确的,因为我使用它们来获取以前的checkins和contue信息列表.
您看到此代码有问题吗?
谢谢.
推荐答案
将OAuth_Token指定为帖子参数,而不是URL路径的一部分.
其他推荐答案
您缺少"广播"参数.它按要求列出:
问题描述
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("https://api.foursquare.com/v2/checkins/add/?oauth_token=my_token"), "POST", "venueId=venue_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?
Thanks.
推荐答案
Specify the oauth_token as a POST param, not part of the URL path.
其他推荐答案
You're missing the 'broadcast' parameter. It's listed as required: