Skip to content

Instantly share code, notes, and snippets.

@othersmallcities
Created November 18, 2016 02:46
Show Gist options
  • Save othersmallcities/2ace61c0245d67ad10389e886e9ba57f to your computer and use it in GitHub Desktop.
Save othersmallcities/2ace61c0245d67ad10389e886e9ba57f to your computer and use it in GitHub Desktop.
Simple Facebook "Like Button" non-js / content blocker work around!
<a class="fb" href="https://www.facebook.com/[pagename]/"><div class="fb-like" data-href="https://www.facebook.com/[pagename]/" data-layout="button" data-action="like" data-size="small" data-show-faces="false" data-share="false">Like!</div></a>
<!--
Since Facebook does not allow customisation for their like button and does not provide any fall back (twitter and pinterest use <a>!!), here is a workaround.
You cannot change the contents of the <div>, so the only way is to wrap it into a link, which links to the profile you would like your visitors to like. Styling can be difficult, but its doable!
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment