3

这是我想在 Facebook 上共享的所有页面上加载的开放图形图像。它在某些页面上正确加载,而在其他页面上则从页面中选择随机图像。以下是 OG 网址。我正在为我的网站使用 Drupal CMS。所有正确的代码似乎都已到位。

http://www.vaeducationoxnard.com/sites/default/files/styles/square_thumbnail/public/Charter%20Square%20Logo.png

4

1 回答 1

0

这是因为,facebook 将整个新请求发送到您传递的 url,因此它从 og:image 获取图像,您在其中传递了默认图像。要克服这个问题,请尝试在您传递的 url 中添加图像参数

前任。你的/url?imgToShare=

在您设置元标记的主页中,添加一个条件

<?php
if(isset($_REQUEST['imgToShare'])
{
 <set the meta tags for image you want>
}
else
{
 <meta tag with the default image>
}
?>

这对我有帮助。

如果您有任何疑问,请发表评论。

于 2014-09-11T07:11:52.520 回答