How to make a Facebook “Like” button that is just a link, not an iFrame?

后端 未结 4 1292
独厮守ぢ
独厮守ぢ 2021-01-07 17:48

I would like to put a \"Like\" button into an email message that it going out to our e-newsletter subscribers. The usual way of embedding a Like button, which uses, an ifram

4条回答
  •  我在风中等你
    2021-01-07 18:36

    It was never possible to like some site with Facebook "Like" plugin from email for security reasons. Only if some server administrator does not cut the JS or iframes, but it is not normal – most email servers cut it.

    This answer (from Yevgeniy Afanasyev) is absolutely wrong! It was never worked! The code in this answer gives you only the possibility to go to Facebook page and then you have there the possibility to like this site. All this code from this answer doesn't more than give you the link like this:

    https://www.facebook.com/plugins/like.php?href=https://stackoverflow.com
    

    In the part href=https://stackoverflow.com from this link you could put any other site adress. If you have in this adress some & character then you have to replace it with &.

    And do not think that if this answer was many times upvoted then it is correct or was worked. I think this users which upvoted this unswer do not understand what they have done. They have seen some code and upvoted it without thinking or without understanding.

    Why is this not possible

    Just imagine you get an email and some link button in it with text "Very funny videos". And then if you click on it then you would like some site which you do not like or do not know. And because of this for security reasons it was never possible.

    You have always to confirm all your actions if you use some links.

    Possible workaround

    Instead of this link you could write some nice landing page for your site and in email you could write this link in email button with adress to this page. And in this page you can use normal Facebook "Like" plugin.

提交回复
热议问题