【问题标题】:How to search by category in Facebook API/FQL如何在 Facebook API/FQL 中按类别搜索
【发布时间】:2014-10-13 15:08:40
【问题描述】:

我正在学习如何在 Facebook Graph API 上使用搜索。

我想格式化一个查询,该查询将返回 Musician/Band 类别中的所有 Facebook 页面。

考虑披头士乐队 (https://graph.facebook.com/thebeatles) 的公共页面,您可以在这里清楚地将其视为一个类别。

到目前为止,据我了解,Graph API v2.1 不接受按类别搜索,我需要使用 v2.0 FQL。这是正确的吗?

如果是这样,以下伪代码的正确语法是什么:

SEARCH ALL PAGES WITH CATEGORY='MUSCIAN/BAND'.

【问题讨论】:

    标签: facebook facebook-graph-api facebook-fql


    【解决方案1】:

    很遗憾,无法按类别搜索页面。

    查询

    select page_id, name from page where categories.name = 'Musician/Band'
    

    失败

    {
      "error": {
        "message": "(#604) Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql ", 
        "type": "OAuthException", 
        "code": 604
      }
    }
    

    虽然categories.name 被标记为可索引 (https://developers.facebook.com/docs/reference/fql/page/)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-04
      • 1970-01-01
      • 2012-02-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多