Foursquare api 没有 return 正确的签到信息

Foursquare api doesn't return correct checkins information

我测试了 foursquare api 在未来的项目中使用它,但遇到了一个奇怪的问题。

我会举例说明。 您通过 Swarm 应用程序签到地点 1 并立即在此处呼叫 地点 端点

https://api.foursquare.com/v2/venues/559bac8f498effd9368131f6/herenow?v=20160606&oauth_token=<token>

您收到正确的数据,您的用户显示在项目数组字段中

"response":{"hereNow":{"count":2,"items":[{"id":"583ede91a36ecd3aeee51647","createdAt":1480515217,"type":"checkin","timeZoneOffset":120,"user":{"id":"355625527","firstName":"Dima","gender":"male","relationship":"self","photo":{"prefix":"https:\/\/irs0.4sqi.net\/img\/user\/","suffix":"\/blank_boy.png","default":true}},"likes":{"count":0,"groups":[]},"like":false},{"id":"583ede0a02b60e59094ddbc5","createdAt":1480515082,"type":"checkin","timeZoneOffset":120,"user":{"id":"43963436","firstName":"Ayhan","lastName":"B","gender":"male","photo":{"prefix":"https:\/\/irs0.4sqi.net\/img\/user\/","suffix":"\/43963436-UWAYC333GLM2YQ4H.jpg"}}}]}}

然后您签到地点 2 并呼叫相同的端点。签入数据正确,您的用户在 items 数组中。 但是,当您返回位置 1 签到时,您的用户未包含在项目数组

"response":{"hereNow":{"count":1,"items":[{"id":"583ede0a02b60e59094ddbc5","createdAt":1480515082,"type":"checkin","timeZoneOffset":120,"user":{"id":"43963436","firstName":"Ayhan","lastName":"B","gender":"male","photo":{"prefix":"https:\/\/irs0.4sqi.net\/img\/user\/","suffix":"\/43963436-UWAYC333GLM2YQ4H.jpg"}}}]}}

相反,foursquare 认为您仍然签到地点 2。

此外,当您签到最近端点时,它会return您最近签到的位置是 1

"response":{"recent":[{"id":"583ee16ed8b0ed757138ec10","createdAt":1480515950,"type":"checkin","timeZoneOffset":120,"user":{"id":"355625527","firstName":"Dima","gender":"male","relationship":"self","photo":{"prefix":"https:\/\/irs0.4sqi.net\/img\/user\/","suffix":"\/blank_boy.png","default":true}},"venue":{"id":"559bac8f498effd9368131f6","name":"Львiвськi  пляцки","contact":{"phone":"0936567878","formattedPhone":"093 656 7878","facebook":"288574604603052","facebookUsername":"lvivskipljacky","facebookName":"Львівські пляцки"},"location":{"address":"вул. Богдана Хмельницького, 10","lat":50.44546701910413,"lng":30.51702892776601,"labeledLatLngs":[{"label":"display","lat":50.44546701910413,"lng":30.51702892776601}],"postalCode":"01001","cc":"UA","city":"Kyiv","state":"Kyiv City","country":"Ukraine","formattedAddress":["вул. Богдана Хмельницького, 10","Kyiv, 01001"]},"categories":[{"id":"4bf58dd8d48988d16a941735","name":"Bakery","pluralName":"Bakeries","shortName":"Bakery","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/food\/bakery_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":2782,"usersCount":1890,"tipCount":75},"url":"http:\/\/www.fest.lviv.ua\/uk\/restaurants\/lvivskipljacky\/","allowMenuUrlEdit":true,"beenHere":{"unconfirmedCount":0,"marked":false,"lastCheckinExpiredAt":0},"specials":{"count":0}},"source":{"name":"Swarm for Android","url":"https:\/\/www.swarmapp.com"},"photos":{"count":0,"items":[]},"posts":{"count":0,"textCount":0},"likes":{"count":0,"groups":[]},"like":false,"comments":{"count":0},"isMayor":false}]}

有没有人也遇到过这个问题?或者 foursquare api 是否对签到有一些限制?我通过网络搜索了它,但找不到任何有用的信息

用户将在签到后在场地 "Here Now" 停留 3 小时,或者直到他们在另一个场地签到。在您的示例中,如果用户的签到模式是 Place 1 -> Place 2 -> Place 1,则用户不会出现在 Place 1s "here now" 中。我不确定这是错误还是有意作为质量控制.