Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2010

    Question Unanswered: Facebook add like button PHP

    Hi, I have problems with add like button for fb. Because I have many articles on site, any of this have own id. URL for some my articles is:

    http: //

    But when add like button, and click on them, i get this URL on facebook pages:

    http: //

    Why "%3F" replace "?"

    My code for like button is


    function curPageURL() {
    $pageURL = 'http';
    if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
    $pageURL .= "://";
    if ($_SERVER["SERVER_PORT"] != "80") {
    } else {
    return $pageURL;

    <iframe src="<?php echo curPageURL();?>; layout=button_count&amp;show_faces=true&amp;width= 148&amp;action=like&amp;colorscheme=light&amp;heig ht=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:148px; height:21px;" allowTransparency="true"></iframe>

    Anyone can help me ?

  2. #2
    Join Date
    Dec 2010

    sestrucc Thus

    user urlencode()...see the php function documentation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts