问题
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
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 ?
回答1:
First, remember that the userless access also have limits (5000 per hour), more info here
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 :)
来源:https://stackoverflow.com/questions/9883896/calling-foursquare-userless-api-from-the-command-line