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 http://www.richardpowell.ie

    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.

    HELP!

    the Code I Used it:

    <!DOCTYPE html>
    <html xmlns=”http://www.w3.org/1999/xhtml”
    xmlns:fb=”http://www.facebook.com/2008/fbml”>
    <head>
    <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″/>
    <title>Richard Powell’s Blog Post</title>
    </head>
    <body>
    <h1>Richard Powell’s Blog Post</h1>
    <p><fb:login-button autologoutlink=”true”></fb:login-button></p>
    <p><fb:like></fb:like></p>

    <div id=”fb-root”></div>
    <script>
    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 +
    ‘//connect.facebook.net/en_GB/all.js’;
    e.async = true;
    document.getElementById(‘fb-root’).appendChild(e);
    }());
    </script>
    </body>
    </html>

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

    (@ebiladdress)

    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.