Foursquare,如何显示我网站所有用户的签到信息?
因此,我知道我网站的每个用户在允许我的网站访问他们的 foursquare 帐户后(在身份验证过程之后)都会有一个 Auth_key。我的理解是,要显示用户的最新签入,我需要使用该用户的 auth_key 并使用 users/self/checkins
端点来获取特定用户的最新检查点。因此,为了让所有用户最新签到,我需要循环访问每个用户,获取每个 auth_key 并获取提要。
我正在制作用户最新签到的提要。因此,它将显示最新的 20 次签到。我可以使用哪个端点来实现这一目标?
So, I understand that each user of my website will have an Auth_key after they allow my website to access their foursquare account (after the authentication process). What I understand is, to display the latest checkins of a user, I need to use that user's auth_key and use the users/self/checkins
end point to get the particular user latest checkpoint. So, in order to get all users latest checkins, I need to loop through each of my users, get each auth_key and get the feeds.
I'm making a feeds of the latest checkins of my users. So, it will be displaying the latest 20 checkins. Which end point can I use to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我相信您寻找的端点是: https://api.foursquare.com /v2/users/self/checkins?oauth_token=
另外,foursquare api 沙箱可以帮助您进行测试:
https://developer.foursquare.com/docs/explore.html #req=用户/自我/签入
I believe the endpoint your looking for is: https://api.foursquare.com/v2/users/self/checkins?oauth_token=
Also, the foursquare api sandbox may help you in testing:
https://developer.foursquare.com/docs/explore.html#req=users/self/checkins
显然,foursquare API 开发人员正在开发“Push API”。因此,每次我们网站授权的用户签入时,foursquare 都会向我们发送数据,而不是向 foursquare 发送请求。
https://github.com/foursquare/hackathon/wiki/Foursquare-Push-API
Apparently, foursquare API developers are working on a 'Push API'. So, instead of we sending request to foursquare, foursquare will send us the data every time a user who is authorized in our website do a check in.
https://github.com/foursquare/hackathon/wiki/Foursquare-Push-API
您实际上可以调用“用户”端点
https://developer.foursquare.com/docs/users/users.html
https://api.foursquare.com/v2/users/USER_ID
有了这个,您可以获得有关 foursquare 用户的所有公共信息
,但是如果您可以获得身份验证密钥,那么使用场地历史记录调用
https://developer.foursquare.com/docs/users/venuehistory.html
https://api.foursquare.com/v2/users/USER_ID/venuehistory
You could actually call the 'Users' endpoint
https://developer.foursquare.com/docs/users/users.html
https://api.foursquare.com/v2/users/USER_ID
With this you can obtain all public information about your foursquare users
However if you can get the auth key then use the venue history call
https://developer.foursquare.com/docs/users/venuehistory.html
https://api.foursquare.com/v2/users/USER_ID/venuehistory