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:
https://developer.foursquare.com/docs/checkins/add.html