打开图 Fitness.runs 不返回数据

Posted

技术标签:

【中文标题】打开图 Fitness.runs 不返回数据【英文标题】:Open graph fitness.runs returning no data 【发布时间】:2013-03-26 15:47:46 【问题描述】:

我有一堆 Nike+ 跑步数据,我假设(基于以下文章)已发布到开放图表。在我的时间线中,它肯定是这样的。

https://developers.facebook.com/blog/post/2012/08/29/early-success-stories--fitness-and-open-graph/

令人沮丧的是,虽然我的 music.listens 请求运行良好并返回了我所有的 Spotify 收听,但我对 Fitness.runs 的请求没有返回任何数据。这仅仅是因为耐克没有与 Open Graph 正确集成吗?或者我可能需要在我的 Auth 令牌中请求扩展权限?

https://developers.facebook.com/docs/reference/opengraph/action-type/fitness.runs

有什么想法吗?

【问题讨论】:

【参考方案1】:

与所有操作一样,您需要正确的权限,在这种情况下

user_actions.fitness

所以从 /me/fitness.runs 返回的耐克数据看起来像


  "data": [
    
      "id": "10101118696330517", 
      "from": 
        "name": "Philippe Harewood", 
        "id": "13608786"
      , 
      "start_time": "2013-03-22T23:15:56+0000", 
      "end_time": "2013-03-22T23:26:36+0000", 
      "publish_time": "2013-03-24T15:50:00+0000", 
      "application": 
        "name": "Nike", 
        "namespace": "nikeapp", 
        "id": "84697719333"
      , 
      "data": 
        "course": 
          "id": "476811255725972", 
          "url": "http://nikeplus.nike.com/plus/activity/running/detail/2118587303?external_share_id=CE32E1C4-93D8-48A7-A08F-6D5B4C13EE6A&is_new_meta=true", 
          "type": "fitness.course", 
          "title": "1.12 miles"
        
      , 
      "type": "fitness.runs", 
      "no_feed_story": false, 
      "likes": 
        "count": 0, 
        "can_like": true, 
        "user_likes": false
      , 
      "comments": 
        "count": 0, 
        "can_comment": true, 
        "comment_order": "chronological"
      
    , 
    
      "id": "10101118696155867", 
      "from": 
        "name": "Philippe Harewood", 
        "id": "13608786"
      , 
      "start_time": "2013-03-19T22:03:32+0000", 
      "end_time": "2013-03-19T22:18:37+0000", 
      "publish_time": "2013-03-24T15:49:46+0000", 
      "application": 
        "name": "Nike", 
        "namespace": "nikeapp", 
        "id": "84697719333"
      , 
      "data": 
        "course": 
          "id": "502469216483599", 
          "url": "http://nikeplus.nike.com/plus/activity/running/detail/2118587302?external_share_id=EBF6BC1D-BDEA-4EE5-B18D-FBC576610F13&is_new_meta=true", 
          "type": "fitness.course", 
          "title": "1.49 miles"
        
      , 
      "type": "fitness.runs", 
      "no_feed_story": false, 
      "likes": 
        "count": 0, 
        "can_like": true, 
        "user_likes": false
      , 
      "comments": 
        "count": 0, 
        "can_comment": true, 
        "comment_order": "chronological"
      
    
  ], 
  "paging": 
    "next": "https://graph.facebook.com/13608786/fitness.runs?limit=25&offset=25&__after_id=10101118696155867"
  

【讨论】:

以上是关于打开图 Fitness.runs 不返回数据的主要内容,如果未能解决你的问题,请参考以下文章

C: read/write

分页问题:返回正文中的总计数和总页数,而不添加到正在获取的其他数据

leetcode-9.回文数(图)

数据到树状图并返回

由已打开的文件读取数据---read

Oracle数据库查询中返回指定的行数例如31到40,主键ID,但不连续,请问这样的语句如何写?