我通过以下链接将“ https://www.cnbc.com/2019/01/13/saudi-energy-minister-on-work-with-oil-producers-to-balance-market.html”作为URL传递给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"
}
}
我在这里想要实现的是从提供给调试器的URL中获取Facebook抓取的数据。
编辑1:
如果您使用以下网址作为测试并按照上述说明进行发布请求。它有效,结果如下:
测试URL: 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"
}
有人能解释一下为什么其他URL在调试器中无法工作的原因吗?