【问题标题】:why the Graph API - Searching( https://graph.facebook.com/search) only send me 25 results为什么 Graph API - 搜索(https://graph.facebook.com/search)只向我发送 25 个结果
【发布时间】:2012-04-01 21:30:23
【问题描述】:

您好,我正在使用 Graph API - 搜索 (https://graph.facebook.com/search),每次只向我发送 25 个结果,并想知道如何获得更多的 25 个结果,并可能按日期过滤。 我希望你能帮助我

【问题讨论】:

    标签: api search facebook-graph-api graph


    【解决方案1】:

    查看Graph API documentation 中的分页。您是否在请求中发送“限制”参数?如果您不传递它,它看起来默认为 25,并且您在响应中获得一个分页对象,其中包含下一页/上一页的请求 URL,您可以使用它们轻松查询页面并显示它们。

    搜索响应中的示例“分页”对象:

    "paging": {
      "previous": "https://graph.facebook.com/search?q=orange&access_token=<your_access_token>&limit=25&since=1333151997&__previous=1",
      "next": "https://graph.facebook.com/search?q=orange&access_token=<your_access_token>&limit=25&until=1333151781"
    }
    

    【讨论】:

      猜你喜欢
      • 2013-04-02
      • 1970-01-01
      • 2015-03-30
      • 2014-03-12
      • 1970-01-01
      • 2016-07-26
      • 2018-04-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多