How to Embed a Facebook Post Box in Your Kindle Book Description

View a live demo here.

Now I will walk you through the steps of getting your Facebook Post box, which pertains to one specific post of yours, embedded in Kindle book description. The type or types of the Facebook box(es) you choose to embed in your book description is of no importance to our discussion in this chapter.

a)      Visit Facebook’s social plugin page at https://developers.facebook.com/docs/plugins/. From the left nave choose “Embedded posts.”

fb_embedded_post

b)      Once I supply my Facebook post’s URL, the widget becomes live:

supply_fb_post_url

c)      Click on the “Get Code” and you will be presented with the code block. Make sure that the HTML5 tab is active. Other formats work as well but for the purpose of embedding the widget into Amazon’s book field, HTML5 is the most suitable:

fb_widget_code

You have probably noticed that Facebook’s widget code, just like that of Twitter, features simple HTML but fairly convoluted Javascript:

<div class=”fb-post” data-href=” //www.facebook.com/by.m.eigh/posts/224182587738322″></div>
<div id=”fb-root”></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/en_US/all.js#xfbml=1″;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>
Once again, we are forced to interpret and re-write the code. For a detailed discussion on how such Javascript should be rewritten, please refer to Chapter Twelve of my book KDP’s Best-Kept Secret Revealed: How to Embed Videos and Widgets in Your Book Description.

From here on we just need to follow the same procedure detailed in Chapter Five of my book KDP’s Best-Kept Secret Revealed: How to Embed Videos and Widgets in Your Book Description. And voila, we have the Facebook Post Box in a book field:

fb_box_live

Let me also point it out to you: Every step of the way throughout the above process, I have to vigilantly strip off the “http:” or “https:” part of a URLs referenced in the widgets’ code block. By default, all the URLs in the code block you obtain from Twitter or Facebook contains such strings. Do not forget to strip them off, or else your widget cannot be rendered in your book page.

For a more in-depth explanation this unique deal-breaker, please read my book KDP’s Best-Kept Secret Revealed: How to Embed Videos and Widgets in Your Book Description.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>