问题描述
foursquare api的推送回调的处理程序有什么要求?
- http动词4SQ用什么来拨打电话?
- 它将哪些参数/信息发送到我的服务器?
- 我的服务器应该回复什么?
令人惊讶的是,我在 https://developer.foursquare.com/overview/
更新:
好吧,由于没有人回答,所以我决定将任何终点的东西插入DB.结果回调永远不会到达我的服务器. Foursquare Push控制台说我的服务器返回502 Bad Gateway,这不是. Foursquare后端是否有可能忽略回调URL中的端口号?我的URL看起来像这个
https://api.hostmane.com:8443/api/handle_4sq_push
推荐答案
好吧,似乎Foursquare没有API团队的任何人负责与开发人员进行沟通.我也给他们发送了电子邮件,但没有人回答.
所以这是我的发现:
问题描述
What are requirements for handler of Push Callback of Foursquare API?
- What http verb 4sq uses to make a call ?
- What parameters/information does it send to my server ?
- What my server should reply ?
Surprisingly I don't see answers on these questions at https://developer.foursquare.com/overview/
Update:
Well, since nobody replied I decided to insert to DB whatever comes to my end-point. Turned out callbacks never reach my server. Foursquare Push Console says my server returns 502 Bad Gateway which it doesn't. Is it possible that Foursquare backend ignores port number in callback URL ? My url looks like this
https://api.hostmane.com:8443/api/handle_4sq_push
推荐答案
Well, seems like Foursquare doesn't have anyone from API team responsible for communicating with developers. I sent them email as well but nobody replied.
So here are my findings:
- Foursquare backend doesn't use port number from call-back url. I think it's a bug. So make sure you're listening on port 443.
- It's HTTP POST with form-url-encoded parameters.
- There are three parameters passed: checkin (this object in json), user (this object in json), secret (Push Secret from settings of your app).
- Your server is supposed to reply with error code 200.