View Full Version : Facebook Share Button on .epub book

12-04-2011, 05:27 AM
I'm using this code for adding share button to my ebook (epub):

<div id="fb-share" dir="rtl" style="float:right;">
<a name="fb_share" type="icon_link" share_url=""><img alt="fb" class="fb" src="../Images/fb.png" />שתף</a>
<script src=""

It works when opens as a web-page but when using epub-reader (FF, IPhone, Android...) it just show the title but it's not clickable...

Any idea why? And how to fix that?


12-04-2011, 06:16 AM
First, do not use "name", it should be "id" in XHTML.

Second, you don't have an "href", the link needs a target "href" property (and I bet "share_url" is not supported either).

Third, <script>, while not forbidden, is almost guaranteed not to work.

Fourth, many ePub readers have no Internet connection, and some of those who have cannot connect to the Internet from the reader application.

12-04-2011, 06:32 AM
Can you please help me with the right code? One which will work?
Secondly, I just found out that when using 'Android' I can't see the link at all...
Is there a difference between the two? Is there a way to make sure it looks well on all systems?

Thanks again :)

12-04-2011, 07:01 AM
Can you please help me with the right code? One which will work?

I don't think so. It seems the code relies on the <script>, which as I said will not generally work in ePub readers.