Facebook Like Button works with Html Page but Not php Blog (3 posts)

  1. richardpowell
    Posted 5 years ago #

    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.


    the Code I Used it:

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml"
    <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;

  2. Mr E
    Posted 5 years ago #

    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.

  3. richardpowell
    Posted 5 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.