是否可以从Foursquare Real-Time API获得多个用户签入

时间:2013-01-10 23:42:56

标签: json api foursquare checkin

我的总体目标是在我正在建立的私人网络应用中显示来自一群朋友的签到(最近的第一次)。

这可能吗? 如果是这样,有人可以引导我朝着正确的方向前进。

提前谢谢你:)

1 个答案:

答案 0 :(得分:1)

只要他们支持你的申请,你就应该能够做到这一点。除非出于明显的安全原因明确允许您,否则您无法执行此操作。如果你想要解决这个问题,你可以进行网络搜索,但这完全是另一个问题。

查看他们的实时API:https://developer.foursquare.com/overview/realtime

创建一个应用程序,然后使用他们的User Push 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"
          }
      }

祝你好运!