从命令行调用Foursquare的API userless [英] Calling foursquare userless api from the command line

查看:163
本文介绍了从命令行调用Foursquare的API userless的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用wget成功利用Foursquare的用组oauth_token API的命令行。例如,

I have been successfully using foursquare's API with the oauth_token from the command line using wget. E.g.,

wget https://api.foursquare.com/v2/venues/4510e899f964a52089391fe3?oauth_token=MY_TOKEN&v=20120327

通过这个命令,我是能够得到响应和分析结果。然而,由于使用的身份验证令牌每小时(等)500请求的限制,因为我感兴趣的userless访问,我想用的的client_id client_secret 。但是,每当我试图调用

With this command, I was able to obtain the response and parse the results. However, since using the authentication token has a limit of 500 requests per hour (etc.) and since I am interested in userless access, I thought of using the client_id and client_secret. However, whenever I am trying to call

wget https://api.foursquare.com/v2/venues/4510e899f964a52089391fe3?client_id=MY_CLIENT_ID&client_secret=MY_CLIENT_SECRET&v=20120327" 

我得到一个错误的请求。是否有可能做我想做?

I get a Bad request. Is it possible to do what I am trying ?

推荐答案

首先,请记住,userless访问也有限制(5000每小时),更多信息的这里

First, remember that the userless access also have limits (5000 per hour), more info here

在上面列出应该工作的要求,我只是测试它,用我的真实身份和秘​​密更换MY_CLIENT_ID为好。
我知道的四角是区分大小写的请求中,client_ID /秘密应该是大写的。

The request you listed above should work, I just tested it, replacing the MY_CLIENT_ID with my real id and the secret as well. I know that foursquare is case-sensitive to the request, the client_id/secret should be uppercase.

我能想到的唯一的事情就是创建您的问题是一个错字,请检查您的数据:)

The only thing I can think of that is creating your problem is a typo, check your data :)

这篇关于从命令行调用Foursquare的API userless的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆