share facebook button with dynamic link

0

Good morning, I've tried several scripts to make my dynamic link shared with the custom Facebook button. I can not I'm trying this:

<?php $linkFace = "http://www.modalle.com.br/blog.php?artigo=".$_GET['artigo'];?>
<a onClick="return goodPopup(this.href)" href="http://facebook.com/sharer.php?u=<?php echo urlencode($linkFace)?>&amp;t=<?php echo urlencode($row['chamada']);?>" target="_blank" class="facebook"></a>

Can anyone help?

    
asked by anonymous 02.02.2017 / 07:21

1 answer

1

Try this

<?php
   $linkFace = "http://www.modalle.com.br/blog.php?artigo=".$_GET['artigo'];?>
?>

<a href="http://facebook.com/sharer.php?u=<?php echo urlencode($linkFace)?>" target="_blank" class="facebook"></a>

Add the suggestion mentioned by your colleague vinicius-sanchez-dos-santos , too it works

    
02.02.2017 / 22:02