Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/06/2011, 07:08
Jannett
 
Fecha de Ingreso: mayo-2005
Mensajes: 10
Antigüedad: 19 años
Puntos: 1
Respuesta: Problema con Facebook (me gusta) y PHP

derrepente esto te ayude...
con php obtiene la url de tu pagina y solo te falta colocarlo en href del iframe......espero q te ayude suerte!

<?php
function getPostURL() {
$postURL = 'http://';

if ($_SERVER["SERVER_PORT"] != "80") {
$postURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$postURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $postURL;
}
$postURL=getPostURL();

echo '<iframe src="http://www.facebook.com/widgets/like.php?href='.$postURL.'"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:40px"></iframe>';
?>