Social Media Counters
The href URL must be absolute (6 posts)

  1. Jack Yan
    Posted 3 years ago #

    As of today, my Facebook “like” button has disappeared and replaced by the word ‘Error’. When I click on it, I get a box, with the URL:


    There is an error message, ‘The href URL must be absolute’.

    I have read some pages about code that needs to be changed, but none of them so far apply to this plug-in. I’d be grateful if you could suggest how the code could be changed.


  2. enej
    Posted 3 years ago #

    on line 482 change $encoded_link to $unencoded_link
    Worked for me.

  3. Jack Yan
    Posted 3 years ago #

    Thanks, Enej. Sadly, it makes no difference to me. :(

  4. edengabe17
    Posted 3 years ago #

    I'm having the same issue. Referencing enej, changing line 482 made no difference for me.

  5. Jack Yan
    Posted 3 years ago #

    Hi Edengabe: I changed to a WordPress plug-in called ‘Really simple Facebook Twitter share buttons’. Does the same thing. I still prefer Social Media Counters but couldn’t afford to be without a Facebook “like”.

  6. fpmsummer
    Posted 3 years ago #

    I wasn't getting any errors, the button just vanished for me. Using version 1.1.2 and WP 3.5.1

    I got it working again using this suggestion, but I had to make the change in two places, for me it was on lines 437 and 500.

    The lines are in the two sections labeled FACEBOOK SHARE, and look like this:
    $phsmc .= '<div class="fb-like" data-href="'.$encoded_link.'" data-send="false" data-layout="button_count"></div>';

    when I changed that to $unencoded_link in both places, the Like button showed up on my posts again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Social Media Counters
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic