• Resolved wenruiblog

    (@wenruiblog)


    Hi,everyone.

    I insert a facebook share code into my blog, but it seems it didn’t work correctly. the code I use is below

    <a href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink());?>" target="_blank"><img src="https://visualneo.com/wp-content/uploads/2015/02/share-fb.jpg" alt="share on facebook"/></a>

    I think is should work in this way:
    here’s the screenshoot: https://i.imgur.com/bzt10wf.png

    while actually, after I click on the share button, it works like this:
    here’s the screenshoot: https://i.imgur.com/3th4wct.png
    which means I have to click share again to make it works the way I want it.

    I failed to figure out any solutions. if you can provide some help. that’s appreciated.

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Johnathan

    (@jelyman)

    Likely has to do with the fact that your PHP code isn’t being parsed right on your page (look at your URL in your browser).

    Thread Starter wenruiblog

    (@wenruiblog)

    I finally fixed it by put the code on right place.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Facebook Share Code Bug’ is closed to new replies.