1

我正在从 url 参数动态生成开放图形元标记。当我显示页面时,一切看起来都很好,如果我检查页面源,我的所有元标记都会完美生成。这是我用来生成它们的代码:

<?
$theSet = htmlspecialchars($_GET['id']);
$theTitle = htmlspecialchars($_GET['title']);
$theTitle1 = str_replace(" ","+",$theTitle);
$theTitle2 = str_replace(" ","-",$theTitle);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr-FR">
<head>
    <meta charset="utf-8" />
    <link rel="canonical" href="http://www.novo-monde.com/photo-album.php?id=<? echo $theSet; ?>&amp;titel=<? echo $theTitle1; ?>" />
    <title><? echo "Album photo ".$theTitle.""; ?></title>
    <meta name="description" content="Vous trouverez sur cette page toutes les photos à propos de l'<? echo "album photo ".$theTitle.""; ?>.">
    <meta property='og:locale' content='fr_fr'/>
    <meta property="og:title" content="<? echo "album photo ".$theTitle.""; ?>" />
    <meta property="og:type" content="article" />
    <meta property="og:description" content="Vous trouverez sur cette page toutes les photos à propos de l'<? echo "album photo ".$theTitle.""; ?>." />
    <meta property="og:url" content="http://www.novo-monde.com/photo-album.php?id=<? echo $theSet; ?>&amp;titel=<? echo $theTitle1; ?>" />
    <meta property="og:image" content="<?getSetSing($theSet);?>"/>
</head>

但是,当我想在 facebook 上分享这些网址之一时,我遇到了问题。事实上,当我分享它时,facebook 似乎删除了 url 中定义的“titel”参数。让我们举个例子。如果我有以下网址:

http://www.novo-monde.com/photo-album.php?id=72157633440493567&title=Walensee

该页面看起来不错,并且页面源中的元标记已正确定义。但是,如果我在 facebook 调试工具中输入此 url(因为它在 facebook 上无法正常工作),该工具会忽略“titel”参数并改用此参数:

http://www.novo-monde.com/photo-album.php?id=72157633440493567&titel=

有谁知道为什么“titel=”之后定义的内容被忽略???我已经不知道去哪里找了……

4

0 回答 0