Facebook/Twitter OpenGraph 不在 Node.js/Angular.js Web 应用程序上抓取图像
Facebook/Twitter OpenGraph not scraping images on Node.js/Angular.js web application
我最近在开发一个 MEAN Stack 应用程序,在某种程度上是一种博客,其中作者 post 文章。为了克服 OpenGraph 应用程序不抓取 Javascript 的问题,我在我的 Nginx 反向代理上实施了一个静态 php 页面和一个规则,该规则重定向来自某些用户代理(如 Facebook,Google+、Twitter 等)到静态页面,以便正确抓取数据。
一切都很好,除了一个小细节,基于 OpenGraph 的应用程序似乎无法抓取文章中的图像,因此丰富的社交分享没有达到预期效果。
例如,测试以下 link : https://moveramontanha.pt/article/5a21539cfdebb1074ed1436d
重定向到静态页面:
https://www.moveramontanha.pt/static_mam.php?id=5a21539cfdebb1074ed1436d
- Facebook 共享调试器给出以下错误 - 随机:
Unsupported Image File Extension Provided og:image URL,
https://www.moveramontanha.pt/uploads/authors/1512141975423.jpg does
not have a supported extension.
或
The provided 'og:image' properties are not yet available because new
images are processed asynchronously. To ensure shares of new URLs
include an image, specify the dimensions using 'og:image:width' and
'og:image:height' tags.
- Twitter 卡片验证程序日志:(无图像)
INFO: Page fetched successfully INFO: 17 metatags were found INFO:
twitter:card = summary tag found INFO: Card loaded successfully WARN:
this card is redirected to
https://www.moveramontanha.pt/static_mam.php?id=5a21539cfdebb1074ed1436d
我已经尝试添加额外的标签,例如图像 width/height、更改图像格式、安全标签等。没有任何效果。
还有其他人遇到过这样的问题吗?
提前致谢!
我最近在开发一个 MEAN Stack 应用程序,在某种程度上是一种博客,其中作者 post 文章。为了克服 OpenGraph 应用程序不抓取 Javascript 的问题,我在我的 Nginx 反向代理上实施了一个静态 php 页面和一个规则,该规则重定向来自某些用户代理(如 Facebook,Google+、Twitter 等)到静态页面,以便正确抓取数据。
一切都很好,除了一个小细节,基于 OpenGraph 的应用程序似乎无法抓取文章中的图像,因此丰富的社交分享没有达到预期效果。
例如,测试以下 link : https://moveramontanha.pt/article/5a21539cfdebb1074ed1436d
重定向到静态页面:
https://www.moveramontanha.pt/static_mam.php?id=5a21539cfdebb1074ed1436d
- Facebook 共享调试器给出以下错误 - 随机:
Unsupported Image File Extension Provided og:image URL, https://www.moveramontanha.pt/uploads/authors/1512141975423.jpg does not have a supported extension.
或
The provided 'og:image' properties are not yet available because new images are processed asynchronously. To ensure shares of new URLs include an image, specify the dimensions using 'og:image:width' and 'og:image:height' tags.
- Twitter 卡片验证程序日志:(无图像)
INFO: Page fetched successfully INFO: 17 metatags were found INFO: twitter:card = summary tag found INFO: Card loaded successfully WARN: this card is redirected to https://www.moveramontanha.pt/static_mam.php?id=5a21539cfdebb1074ed1436d
我已经尝试添加额外的标签,例如图像 width/height、更改图像格式、安全标签等。没有任何效果。
还有其他人遇到过这样的问题吗?
提前致谢!