The following procedure describes the easiest way to use the Spritz SDK for JavaScript.
1. Load the JavaScript into your page.
2. Initialize the client with your application ID.
3. Define an element with data-role="spritzer" on your page.
A redicle appears on your page that will spritz the page that hosts it.
login_success.html (this is a required file to download and host on your website).
For your login success file to work, point your redirectUri parameter to the location of your login_success.html file, and include the full protocol and path to this file. For example your redirectUri setting should look something like:
redirectUri: "http://mysite.com/login_success.html"
Be sure your callback uri matches the originating domain. If your website user visits www.mysite.com/somepage.html, be sure your redirect uri includes www. If your website user is coming from mysite.com/somepage.html, be sure the redirect uri does not include www.