We are trying to implement Reply functionality: https://developer.foursquare.com/docs/checkins/reply
We are receiving "HTTP Error 400: Bad Request" when we execute the code below. I've verified that the checkinId and oauth token are valid. (I just extracted the values from the 'checkin' data structure sent to our servers by foursquare's test console).
checkinId="508XXXXXXXXXXXXXXXXXXX"
oauth="123456789877655ADGHJETJNKK"
data = {"CHECKIN_ID":checkinId,
"text":"Hello World!",
"url":"https://ourwebsite.com",
"contentId":"12345",
}
postUrl = "https://api.foursquare.com/v2/checkins/"+str(checkinId)+"/reply?oauth_token="+oauth
data = urllib.urlencode(data)
req = urllib2.Request(url=postUrl,data=data)
resp = urllib2.urlopen(req)
print resp.read()
Any suggestions are greatly appreciated!