对Foursquare API的Push Callback的处理程序有什么要求? [英] What are requirements to handler of Push Callback of Foursquare API?

查看:114
本文介绍了对Foursquare API的Push Callback的处理程序有什么要求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Foursquare API的推回回调处理程序有哪些要求?

What are requirements for handler of Push Callback of Foursquare API?

  • 4sq用来拨打电话的http动词是什么?
  • 它将什么参数/信息发送到我的服务器?
  • 我的服务器应该回复什么?

令人惊讶的是,我在 https://developer.foursquare.com/overview/上看不到这些问题的答案

更新:

好吧,由于没有人回答,所以我决定将任何有关端点的内容插入DB.原来,回调永远不会到达我的服务器. Foursquare Push Console表示我的服务器未返回502 Bad Gateway. Foursquare后端是否可能会忽略回调URL中的端口号?我的网址看起来像这样

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

推荐答案

好吧,Foursquare似乎没有来自API团队的任何人与开发人员进行沟通.我也向他们发送了电子邮件,但没有人答复.

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.

所以这是我的发现:

  • Foursquare后端不使用回叫网址中的端口号.我认为这是一个错误.因此,请确保您正在侦听端口443.
  • 这是带有表单URL编码参数的HTTP POST.
  • 传递了三个参数:checkin(json中的此对象), user(此对象在json中),secret(从您的应用程序设置).
  • 您的服务器应返回错误代码200.
  • 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.

这篇关于对Foursquare API的Push Callback的处理程序有什么要求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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