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

后端 未结 4 1278
独厮守ぢ
独厮守ぢ 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:29

    It would be a horribly insecure system if a link could force the action to happen. People would be 'liking' things all the shop that they didn't want to. Imagine how easy it would be for companies to send out a shortened URL on twitter and get hundreds of illicit 'likes'.

    It's better to let people do that explicitly themselves so from an email the best you can do is to link people to the facebook page and hope they'll click like. If it's a good/useful page then chances are they will.

    One approach is to have the email aimed at getting people to a landing page on your own site. You can then have a like button on that and using the Open Graph Protocol meta tags have that 'like' applied to the home page or whole site.

    If you want your like button on the landing page to be a general one for the entire site then use the canonical og:url meta tag eg:

    
    

提交回复
热议问题