【问题标题】:Facebook Graph Api not returning all posts under story_tagsFacebook Graph Api 未返回 story_tags 下的所有帖子
【发布时间】:2015-11-29 04:42:30
【问题描述】:

Graph Api 未返回 Feed 中某个 Story 下的所有帖子。我只收到包含超过 5 个帖子的故事的前 5 个帖子(例如 Mxxxx Sxxxx 和其他 9 个在您的时间轴上写的帖子。

Facebook Graph Api 查询:me/feed?fields=story,story_tags

回应:

{
  "data": [
    {
      "story": "Mxxxx Sxxxx and 9 others wrote on your timeline.",
      "story_tags": [
        {
          "id": "7866205680XXXXX",
          "name": "Mxxxx Sxxxx",
          "type": "user",
          "offset": 0,
          "length": 12
        },
        {
          "id": "18082XXXXX",
          "name": "Vxxxx Axxxx",
          "type": "user",
          "offset": 40,
          "length": 8
        },
        {
          "id": "6155873819XXXXX",
          "name": "Sxxxxx Bxxxxx",
          "type": "user",
          "offset": 17,
          "length": 8
        },
        {
          "id": "936063789XXXXXX",
          "name": "Rxxxx Mxxxx",
          "type": "user",
          "offset": 17,
          "length": 8
        },
        {
          "id": "8535750780XXXXX",
          "name": "Kxxx Cxxxx",
          "type": "user",
          "offset": 17,
          "length": 8
        }
      ],
      "id": "18082XXXXX_10203695403XXXXXX"
    },

【问题讨论】:

  • story_tags 是一个已弃用的字段,您是否看到与 message_tags 字段相同的问题?
  • 不,我在message_tags 中没有看到。如上所述,我所有的生日祝福都合并为一个story_tag
  • 我也有同样的问题。你找到解决办法了吗?

标签: facebook facebook-graph-api


【解决方案1】:

有时你只需要告诉 graph-API 你想要所有的结果。您可能需要将返回结果的限制设置为更大的数字。

试试这个:

GET /v2.5/me/feed?fields=story,story_tags&limit=10000 HTTP/1.1
Host: graph.facebook.com

【讨论】:

  • @VipulAsri 现在怎么样?
  • 我的问题是我所有的生日祝福都在story_tag下,如何检索story_tag下的所有帖子,因为它只显示前5个。你提供的解决方案,我已经尝试过,但不幸的是,正如查询所描述的那样,它限制了来自提要的故事,而不是限制在一个故事下的帖子。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多