Script Url Parameter - auto_load

Description

The auto_load parameter, when set to true, may be used to embed a FatSecret Platform in a web page using a single line of code. When true, auto_load automatically adds necessary elements to the browser's document object model (DOM) and loads the home canvas on the web page.

Values

true
Loads the home canvas at the initial start
false
Does not load up any canvas at the initial start
default
Default value is "false"

Example

auto_load = "true"
<script src="https://platform.fatsecret.com/js?key=XXXXX&auto_load=true"></script>
Figure 1: Auto load turned on
auto_load = "false"
<script src="https://platform.fatsecret.com/js?key=XXXXX&auto_load=false"></script>

<div id="my_div" class="fatsecret_container"></div>

<script>
fatsecret.setContainer("my_div");
fatsecret.setCanvas("home");
</script>
Figure 2: Auto load turned off, manually loading the home canvas
For more information see the Quick Start guide.
FatSecret Sites
For Developers

For Professionals

For Everyone

FatSecret Platform API

Support
API

About FatSecret

© 2021 FatSecret. All rights reserved.