使用Foursquare API的400错误请求

编程入门 行业动态 更新时间:2024-10-28 16:27:02
本文介绍了使用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错误请求

本文发布于:2023-10-12 02:34:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483514.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   Foursquare   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!