Support » Plugins » Facebook Like Button works with Html Page but Not php Blog

  • Hey so I created a Html page HERE and the facebook like button code works perfect, it shows on FB as:

    NAME likes Richard Powells Blog Post on

    If I add the same codes into my single.php page of the blog I get an error and if it does happen to work I get

    NAME likes Richard Powell on Richard Powell

    but mostly it hasnt worked.


    the Code I Used it:

    <!DOCTYPE html>
    <html xmlns=””
    <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″/>
    <title>Richard Powell’s Blog Post</title>
    <h1>Richard Powell’s Blog Post</h1>
    <p><fb:login-button autologoutlink=”true”></fb:login-button></p>

    <div id=”fb-root”></div>
    window.fbAsyncInit = function() {
    FB.init({appId: ‘128924280458506’, status: true, cookie: true,
    xfbml: true});
    (function() {
    var e = document.createElement(‘script’);
    e.type = ‘text/javascript’;
    e.src = document.location.protocol +
    e.async = true;

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mr E


    I’ll guess that your only using whats inside the BODY tags.

    Even if that’s the case, html is limited in WordPress however I’ve had luck running Raw HTML Plugin to allow most html code to be utilized.

    The code within the </Head> tags is the Facebook like button. I can add that to a html document and it works perfect, I add it to my single.php to place under comments and it flags an error when clicked!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Facebook Like Button works with Html Page but Not php Blog’ is closed to new replies.