0

我的总体目标是在我正在构建的私人网络应用程序上显示一组朋友的签到(最近一次)。

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

先感谢您 :)

4

1 回答 1

1

只要他们 oAuth 你的应用程序,你应该能够做到这一点。除非他们出于明显的安全原因明确允许您这样做,否则您不能这样做。如果你想解决这个问题,你可以网络抓取,但这完全是另一个问题。

看看他们的实时 API: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"
          }
      }

祝你好运!

于 2013-01-10T23:57:27.693 回答