我的总体目标是让一群朋友的签到(最近的第一个)显示在我正在构建的私人web应用程序上。
这个是可能的吗?如果是这样的话,有没有人能把我引向正确的方向。
提前感谢您:)
发布于 2013-01-11 07:57:28
只要他们oAuth你的应用程序,你就应该能够做到这一点。除非出于明显的安全原因,他们明确允许您这样做,否则您不能这样做。如果你想解决这个问题,你可以通过网络抓取,但这完全是另一回事。
看看他们的实时应用编程接口:https://developer.foursquare.com/overview/realtime
创建一个应用程序,然后利用他们的用户推送API -每次他们中的一个人签到时,它应该向你的服务器推送类似这样的东西:
{
"id": "4e6fe1404b90c00032eeac34",
"createdAt": 1315955008,
"type": "checkin",
"timeZone": "America/New_York",
"user": {
"id": "1",
"firstName": "Jimmy",
"lastName": "Foursquare",
"photo": "https://foursquare.com/img/blank_boy.png",
"gender": "male",
"homeCity": "New York, NY",
"relationship": "self"
},
"venue": {
"id": "4ab7e57cf964a5205f7b20e3",
"name": "foursquare HQ",
"contact": {
"twitter": "foursquare"
},
"location": {
"address": "East Village",
"lat": 40.72809214560253,
"lng": -73.99112284183502,
"city": "New York",
"state": "NY",
"postalCode": "10003",
"country": "USA"
},
"categories": [
{
"id": "4bf58dd8d48988d125941735",
"name": "Tech Startup",
"pluralName": "Tech Startups",
"shortName": "Tech Startup",
"icon": "https://foursquare.com/img/categories/building/default.png",
"parents": [
"Professional & Other Places",
"Offices"
],
"primary": true
}
],
"verified": true,
"stats": {
"checkinsCount": 7313,
"usersCount": 565,
"tipCount": 128
},
"url": "http://foursquare.com"
}
}祝你好运!
https://stackoverflow.com/questions/14269324
复制相似问题