【问题标题】:list of Page Categories on facebookfacebook 上的页面类别列表
【发布时间】:2013-01-30 15:18:24
【问题描述】:

我正在开发 facebook 搜索,我想列出所有页面类别(不相关,但我正在使用 koala ruby​​ gem):

type="page" 的搜索结果如下:

{"category"=>"Community", "name"=>"Koala", "id"=>"7356642860"}
{"category"=>"Product/service", "name"=>"Koala Groupe", "id"=>"188919981197745"}
{"category"=>"Public figure", "name"=>"Cushelle Koala", "id"=>"109202405786555"}
{"category"=>"Dancer", "name"=>"Koala Dance Bots", "id"=>"208563099183596"}
{"category"=>"Musician/band", "name"=>"Kid Koala", "id"=>"17527901121"}
{...}

我正在尝试开发一种表单以允许用户实现更精确的搜索。

然后,我希望用户有一个类别列表,但是:如何获取 facebook 页面类别列表?

【问题讨论】:

    标签: facebook-graph-api facebook-page koala


    【解决方案1】:

    使用以下 API 获取页面类别列表

    FB.api(
      '/fb_page_categories',
      'GET',
      {},
      function(response) {
          // Insert your code here
      }
    );
    You will get response as
     {
        "data": [
          {
            "name": "Advertising/Marketing",
            "fb_page_categories": [
              {
                "name": "Advertising Agency",
                "id": "164886566892249"
              },
              {
                "name": "Brand Agency",
                "id": "1736039333278498"
              },
              {
                "name": "Copywriting Service",
                "id": "197029287003787"
              },
              {
                "name": "Digital/Online Marketing Agency",
                "id": "1751954525061797"
              },
              {
                "name": "Internet Marketing Service",
                "id": "1706730532910578"
              },
              {
                "name": "Marketing Agency",
                "id": "123377808095874"
              },
              {
                "name": "Marketing Consultant",
                "id": "170992992946914"
              },
              {
                "name": "Media Agency",
                "id": "281507032196735"
              },
              {
                "name": "Public Relations Agency",
                "id": "192021210817573"
              },
              {
                "name": "Social Media Agency",
                "id": "530553733821238"
              },
              {
                "name": "Telemarketing Service",
                "id": "197557456921449"
              }
            ],
            "id": "1757592557789532"
          }
    
    and so on.... 
    

    【讨论】:

      【解决方案2】:

      这里有一个类似的问题:

      Authoritative List of all Facebook Subcategories

      我回复了。希望这会有所帮助。

      【讨论】:

        【解决方案3】:

        标准的 Graph API 调用是:

        https://graph.facebook.com/v2.10/fb_page_categories?access_token={access_token_obfuscated}

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2017-12-15
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多