使用 facebook graph API 时出现无效参数错误

问题描述 投票:0回答:1

我传递“https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil- Producers-to-balance-market.html”作为网址通过以下链接到 facebook 共享调试器:

Facebook 共享调试器

我们可以看到facebook抓取的所有结果。如果我们向下滚动并查看 URL 部分下列出的条目,我们会看到一个名为 Scrape API 的条目。如果我们单击它,它将打开图形 api 资源管理器,并自动填充字段。

POST/v3.2/?scrape=true&id=https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html

之前可以用,但是突然就不行了。我得到的错误如下所示:

{
  "error": {
    "message": "Invalid parameter",
    "type": "OAuthException",
    "code": 100,
    "error_subcode": 1611008,
    "is_transient": false,
    "error_user_title": "Object Missing a Required Value",
    "error_user_msg": "Object at URL 'https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html' of type 'article' is invalid because a required property 'al:ios:url' of type 'appsite' was not provided.",
    "fbtrace_id": "Gb0BSdJyfGb"
  }
}

我在这里想要实现的是获取 facebook 从提供给调试器的 url 中抓取的数据。

编辑1:

如果您使用以下 url 作为测试并按照上述方式执行 post 请求。成功了,结果如下:

测试网址:

https://www.bloomberg.com/news/articles/2019-01-13/asian-stocks-to-start-mixed-with-earnings-in-focus-markets-wrap?srnd=premium

结果:

{
  "url": "https://www.bloomberg.com/news/articles/2019-01-13/asian-stocks-to-start-mixed-with-earnings-in-focus-markets-wrap",
  "type": "article",
  "title": "Stocks Fall, Bonds Rise as China and Banks Weigh: Markets Wrap",
  "image": [
    {
      "url": "https://assets.bwbx.io/images/users/iqjWHBFdfxIU/iZv8.HNBZJtU/v0/1200x674.jpg"
    }
  ],
  "description": "U.S. stocks declined and Treasuries rose as weak Chinese trade data and troubling signals in bank earnings weighed on investor confidence. The dollar edged lower.",
  "site_name": "Bloomberg.com",
  "updated_time": "2019-01-14T14:38:37+0000",
  "id": "2214485868588392"
}

有人可以解释为什么其他网址在调试器中工作但无法工作吗?

facebook facebook-graph-api facebook-debugger
1个回答
0
投票

消息 - 无效的参数类型 - FacebookApiException 代码 - 100 error_subcode - 1487833 is_transient - true error_user_title - 图像未下载 error_user_msg - 您的图像,https://gcdnb.pbrd.co/images/QvqOfrNXcSLh.png,无法下载被下载。请稍等几分钟,然后再试一次。 fbtrace_id - AnegSO5hfiRAryD-MeENdva

© www.soinside.com 2019 - 2024. All rights reserved.