Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/01/2013, 07:31
maiky_forrester
 
Fecha de Ingreso: septiembre-2011
Mensajes: 18
Antigüedad: 12 años, 7 meses
Puntos: 0
Problema con los metas de Facebook

Buenas, he insertado los meta tags de facebook, pero en el facebook debuger me sale este error. https://developers.facebook.com/tools/debug

"Meta Tags In Body: You have tags ouside of your . This is either because your was malformed and they fell lower in the parse tree, or you accidentally put your Open Graph tags in the wrong place. Either way you need to fix it before the tags are usable."

Inspecciono como me ve facebook y resulta que me cierra la etiqueta </head> antes de las metas de facebook. De hecho me la cierra después de <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> que es la 1º línea.

Como veréis he intentado meter las etiquetas "description" y

Seguramente será una tontería pero no logro resolver el problema por más que lo intento.



Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html lang="es" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#"
  3. xmlns:fb="http://www.facebook.com/2008/fbml">
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <?php
  6.             include ("urls.php");
  7.             include ("conex.php");
  8.            
  9. ?>
  10. <?php
  11.    //get the function
  12.    include_once ('function.php');
  13.  
  14.         $page = (int) (!isset($_GET["page"]) ? 1 : $_GET["page"]);
  15.         $limit = 1;
  16.         $startpoint = ($page * $limit) - $limit;
  17.        $statement = "`db1`";
  18. ?>
  19.  
  20. <?php
  21.                 $id = $_GET['id'];
  22.                 if (empty($id)){
  23.                 ?>
  24.                 <title>XXXXXXXXXXX | Inicio </title>
  25.                 <meta name="description" content="XXXXXXXXXXX." />
  26.                 <meta name="keywords" content="XXXXXXXXXXX." />
  27.                 <?php } ?>
  28.                
  29.                 <?php
  30.                 if (!empty($id)){
  31.                         $resultado=mysql_query("select * from db1 WHERE db1.lel_id = $id");
  32.                         while($fila=mysql_fetch_array($resultado)){
  33.                         ?>
  34.                         <title><?php echo $fila['tit']?></title>
  35.                         <meta name="description" content="<?php echo $fila['des1']?>" />
  36.                         <meta name="keywords" content="XXXXXXXXXXX" />
  37.                         <?php } ?>
  38.                     <?php } ?>
  39. <meta property="fb:app_id" content="XXXXXXXXXXX"/>
  40. <meta property="fb:admins" content="XXXXXXXXXXX"/>
  41. <meta property="og:url" content="http://www.XXXXXXXXXXX.es/"/>
  42. <meta property="og:image" content="http://XXXXXXXXXXX.es/images/imagenfb.jpg"/>
  43. <meta property="og:description" content="XXXXXXXXXXX"/>
  44. <meta property="og:title" content=" XXXXXXXXXXX | Inicio"/>
  45. <link href="http://XXXXXXXXXXX.es/css/960.css" rel="stylesheet" type="text/css" />
  46. <link href="http://XXXXXXXXXXX.es/css/reset.css" rel="stylesheet" type="text/css" />
  47. <link href="http://XXXXXXXXXXX.es/css/style.css" rel="stylesheet" type="text/css" />
  48. <link href="http://XXXXXXXXXXX.es/css/B_blue.css" rel="stylesheet" type="text/css" />
  49. <link rel="shortcut icon" href="http://XXXXXXXXXX.es/images/favicon.jpg" type="image/x-icon" />
  50.  
  51. <!--SLIDER-->
  52. <link rel="stylesheet" type="text/css" href="http://programajoven.es/css/layout.css" />
  53. <link rel="stylesheet" type="text/css" href="http://programajoven.es/css/style3.css" />
  54. <script language="javascript" type="text/javascript" src="js/jquery.js"></script>
  55. <script language="javascript" type="text/javascript" src="js/jquery.easing.js"></script>
  56. <script language="javascript" type="text/javascript" src="js/script.js"></script>
  57. <script type="text/javascript">
  58.  
  59.   var _gaq = _gaq || [];
  60.   _gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
  61.   _gaq.push(['_trackPageview']);
  62.  
  63.   (function() {
  64.     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  65.     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  66.     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  67.   })();
  68.  
  69.  
  70. </head>

La verdad es que no se si es en las metas propias del fb, en mi distribución PHP o en qué. Porque fuera de que vayan las metas de fb o no el contenido dinámico me lo carga bien, cuando veo el código fuente de mi página lo hace bien, pero Facebook me cierra el </head> nada mas saltar a la 2º línea.
Les estaré muy agradecido si me dicen en que estoy fallando.
Muchas Gracias.

Última edición por maiky_forrester; 26/01/2013 a las 08:33