Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用于重定向的Facebook链接预览_Facebook_Facebook Graph Api - Fatal编程技术网

用于重定向的Facebook链接预览

用于重定向的Facebook链接预览,facebook,facebook-graph-api,Facebook,Facebook Graph Api,链接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

链接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>

window.location.replace(“http://www.yahoo.com");

谢谢

一般来说,Facebook应该遵循重定向,因为用户将被重定向,Facebook不希望呈现意外结果,从而造成中断体验

由于301是永久重定向,我想你也可以使用最终的URL

另外,查看-输入URL,它将显示facebook爬虫正在做什么