This document is intended for developers who are trying to build Fotomoto compatibility into their lightbox, gallery, or other photo library.
Image galleries are diverse in their appearance and implementation. It's not possible for Fotomoto to support every implementation automatically, so we have provided some API hooks that any developer can use to add Fotomoto Buy Buttons to their gallery.
Three simple steps:
- Decide where you'll put the Buy Buttons. Add an HTML element having class "FotomotoToolbarPosition" anywhere in the page. For example, <span class="FotomotoToolbarPosition"></span>.
- Call our API every time an image loads. Whenever an image is loaded in the gallery, call FOTOMOTO.API.setBoxImage(url) with the URL of the image.
- Call the API to remove the Buy Buttons. Whenever you are done with the view and want to remove the Buy Button toolbar, call FOTOMOTO.API.removeBoxToolbar() (only if the buy buttons are found outside the lightbox).
For more on our API, see Getting Started with the Fotomoto API.