当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Foursquare, how to display checkins feed from all users of my website?

问题描述:

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?

网友答案:

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

网友答案:

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

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: