• Hey guys!

    I was trying to update the image that a plugin pulls in for a Facebook button. When I changed the img src code it says this:

    Parse error: syntax error, unexpected T_STRING…on line 669

    Here’s the code for the original line:
    $vcFbConnectButton = "<div id=\"fb-root\"></div><div class=\"fbConnectButton\"><a href=\"https://www.facebook.com/dialog/oauth?client_id=".$fbAppID."&redirect_uri=".$redirectUrl."&scope=email&response_type=token\"><img src=\"https://static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif\" border=\"0\" /></a></div>";

    Here’s the code for the fix I made that cause the T-STRING Effor:

    $vcFbConnectButton = "<div id=\"fb-root\"></div><div class=\"fbConnectButton\"><a href=\"https://www.facebook.com/dialog/oauth?client_id=".$fbAppID."&redirect_uri=".$redirectUrl."&scope=email&response_type=token\"><img src=\"https://www.localleadmaximizer.com/wp-content/uploads/2013/10/Facebook_Connect.png" border=\"0\" /></a></div>";

    Any idea what I did wrong? Seems like a pretty simple change.

    There are 3 other places this img file is used in this plugin so…I assume I will have to change it there as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • you need a \ after the .png – that is an escape character that makes sure the ” is interpreted correctly – it’s not part of the URL

    ie

    src=\"https://www.localleadmaximizer.com/wp-content/uploads/2013/10/Facebook_Connect.png\"

    Thread Starter RKCastillo

    (@rkcastillo)

    I tried that before I wrote this post and it didn’t change anything.

    did you refresh your browser afterwards?

    Definitely needs this, and if you’ve changed nothing else, this would be the obvious error.

    If still not working, try changing back to confirm that just this change is affecting it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Parse error:unexpected T_STRING Help’ is closed to new replies.