Foursquare api不会返回正确的签入信息

时间:2016-11-30 14:36:56

标签: foursquare

我测试了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并调用同一个终点。签入数据是正确的,您的用户在项目数组中。 但是当您回到第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. 2。

此外,当您检入最近的端点时,它会返回您最近的签到位置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对签到有一些限制吗?我通过网络搜索了它,但找不到任何有用的信息

1 个答案:

答案 0 :(得分:0)

用户将在场地中显示&#34; Here Now&#34;签到后3个小时或直到他们在另一个地点办理登机手续。在您的示例中,用户不会出现在Place 1s&#34;现在这里&#34;如果他们的签到模式是地点1 - >地点2 - &gt;放置1.我不确定这是一个错误还是故意作为质量控制。