链接A >> 301 >>链接B.
Facebook链接预览显示来自链接A的数据。我希望它显示来自链接B的数据。
我怎样才能解决这个问题?
我使用此代码进行重定向。
<!DOCTYPE html>
<html lang="en">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head>
<body>
<script type="text/javascript">
window.location.replace("http://www.yahoo.com");
</script>
</body>
</html>
谢谢
一般来说,Facebook应该遵循重定向,因为用户将被重定向,并且Facebook不希望呈现意外结果导致破坏性体验。
因为301是永久重定向,所以你也可以使用最终的URL。
另外,看看https://developers.facebook.com/tools/debug/ - 输入URL,它将显示facebook抓取工具正在做什么。