Compartir la misma página en Facebook con diferentes títulos/fotos

I have many photos on the page and I'd like to add like buttons to them, so I created a page photo.php?id=x and link like buttons to it with different variabiles. But fb removes all variabiles after posting! About 1 year ago it was working, but now I can`t add variabiles in link to share.

There is another way to share the page with different ID?

echo '<iframe src="//'.$curfolder.'photo.php%3Fid%3D'.$row["id"].'&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>';


id = 1-5 for test


echo '<div class="fb-like" data-href="'.$curfolder.'photo.php?id='.$row["id"].'" data-send="false" data-layout="button_count" data-width="150" data-show-faces="true"></div>';

with this one: it share a page with variabiles but doesn`t pick up info (photo, title)

or old sharer:

echo '<a target="_blank" rel="nofollow" href="'.$curfolder.'photo.php?id='.$row["id"].'"><img style="margin-bottom:25px;" src="/images/fb_share_img.png"></a>';

preguntado el 01 de julio de 12 a las 09:07

Can you post the code you are using, what is the url you're giving to the like button? -

Make sure that your url is url-encoded and that the facebook parts are not. It seems like you kind of confused things with the encoding. -

Sorry what do you mean? I tried to insert link: <..>/like.php?…..> it doesn`t help -

Try to take a url of your for testing (full url) and use this Decodificador / codificador de URL. Put the url in the textarea and click the Encode button, take the result and put it in the like button and see if it works. -

just tried, no, it doesn`t work, I tried it already becouse fb button creator use encoding. but it removes all variabiles... I have an old site in which the same script was working but about 6 month ago it was broken without any change by me... -

1 Respuestas

I think that your problem is with the og:url metaetiqueta.

Mira lo que herramienta de depuración says about your url:

URL obtenida:
URL canónica:

I believe that if you fix that and return the same url for the og:url it will behave as you want it.

Respondido 01 Jul 12, 10:07

Thank you! It works with old sharer, so I use it... Like button doesn`t work for the moment, but some problems was there. Will test it now more:) - miguel moro

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.