Is there any way to add a Facebook Share Button to a static HTML page? I've implemented a simple web site with no server side, just a bunch of html pages and I was abble to add a Like button because it is implemented with iFrame element. I have searched for a solution regarding the Share Button before posting here, but can't really find anything.
(Example of a share button can be seen on a youtube web site, on share section of each video.)
Any help is appreciated.
Ok, so apparently FB has updated their privacy settings... For those of you seeing the "Share" option in your posts... That means that post is open to the public to see. If you have your profile settings set to "Friends", then no one will be able to share your posts.
This should solve your problem: FB Share button/dialog documentation Genereally speaking you can use either normal HTML code and style it with CSS, or you can use Javascript.
Here is an example:
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fparse.com" target="_blank" rel="noopener">
<img class="YOUR_FB_CSS_STYLING_CLASS" src="img/YOUR_FB_ICON_IMAGE.png" width="22px" height="22px" alt="Share on Facebook">
</a>
Replace https%3A%2F%2Fparse.com, YOUR_FB_CSS_STYLING_CLASS and YOUR_FB_ICON_IMAGE.png with your own choices and you should be ok.
Note: For the sake of your users' security use the HTTPS link to FB, like in the a's href attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With