Skip to content

avk/iBooks-Social-Widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iBooks Social Widget

This is a small HTML widget designed to make it easy to post to Twitter, Facebook, and Google+ from an iBook. It can be embedded in iBooks created with iBooks Author. The iBooks Social Widget is based on Trevor Burnham's iBooks HTML Widget Boilerplate

Why?

Because the Tweet button, Like button, and Google +1 button don't work in an iBook out of the box. An iBook HTML widget will not load external JavaScript or an iframe, so the methods for sharing things on Twitter, Facebook, and Google+ that work for web sites won't work for an iBook. The iBooks Social Widget approach is based on sharing bookmarklets that submit what will be shared to special Twitter, Facebook, or Google+ URLs.

The recommended approach for creating an HTML widget for iBooks Author is currently to create a Dashboard widget in Dashcode. This adds a lot of distracting cruft, and things that work fine in Dashcode have a tendency to stop working in iBooks. In short, it's better to treat an iBooks widget as a web page rather than as a Dashboard widget.

Usage

  1. Download or clone this repository.

  2. Update the TODOs in main.html to share the content you want on Twitter, Facebook, and Google+.

  3. (Optional) Change the look & feel of things in style.css.

  4. Rename the entire directory to end in .wdgt: ibooks-social-widget => ibooks-social-widget.wdgt

  5. Drag the .wdgt file into iBooks Author.

Preview image

Notice that when you drag the .wdgt into iBooks Author, you just get a small preview image. iBooks doesn't load anything from your HTML widget other than Default.png until the user taps it. To show a different image, replace Default.png

Widget dimensions

Open up Info.plist to set the appropriate width and height for your widget. When opened on the iPad, the widget will be scaled to fit the screen but will maintain the correct width/height proportion. Also note that 1px in your markup refers to 1px according to the Info.plist dimensions, not the actual pixels on the device screen.

License

http://trevorburnham.mit-license.org/ The included 3-clause BSD license (BSD_LICENSE.txt)

Contributors

Trevor Burnham Arthur Klepchukov

About

iBooks Author HTML widget designed to make it easy to post to Twitter, Facebook, and Google+ from an iBook.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published