如何告诉Facebook爬虫遵循链接?

时间:2019-08-22 06:02:35

标签: curl redirect http-headers web-crawler facebook-opengraph

尽管浏览器可以自动重定向链接(如果有位置HTTP响应标头),但Facebook Crawler不能,因为它没有-L标志:

curl -v --compressed -H "Range: bytes=0-524288" -H "Connection: close" -A "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" "$URL"

可能这就是Open Graph checkers are unable to detect Open Graph data

的原因

不幸的是,我的网站使用Nginx托管在共享托管中,因此看来我无法修改nginx.conf。但是我会使用WordPress,如果有帮助的话。

有没有办法告诉它自动重定向?

0 个答案:

没有答案