php - dynamically generated open graph tags are missing parameters from URL -
i'm generating open graph meta tags dynamically url paramaters. when display page, looks fine , if check page source, meta tags generated perfectly. here code use generate them:
<? $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; ?>&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; ?>&titel=<? echo $thetitle1; ?>" /> <meta property="og:image" content="<?getsetsing($theset);?>"/> </head>
however, have problems when want share 1 of these urls on facebook. in fact, when share it, facebook seems remove "titel" parameter defined in url. lets take example. if have following url:
http://www.novo-monde.com/photo-album.php?id=72157633440493567&title=walensee
the page looks fine , meta tags in page source defined properly. if enter url in facebook debug tool (as not work on facebook), tool ignores "titel" parameter , uses 1 instead:
http://www.novo-monde.com/photo-album.php?id=72157633440493567&titel=
does know why defined after "titel=" beeing ignored ??? have no idea anymore...
Comments
Post a Comment