The client application contains all of the client-side APIs that allow you to access Wetpaint Injected functionality. It requires a minimum of two script tags in the HTML of your page, though as you add functionality, you may add more. Learn more about the
client application in our
API reference.
The Javascript Bootstrap
The client application is loaded via a bootstrap that requests Javascript and CSS resources. The bootstrap must be included in the <head> section of your page:
| <script src="http://wapi.wetpaint.com/JavaScriptService/getBootstrap.do?key=<your developer key>" type="text/javascript"></script> |
Setting the Site Properties
Immediately following the bootstrap, you will need to set up the properties your site will use to identify itself.
<script type="text/javascript">
if( window.WPCAPI ) {
WPCAPI.setLoginTicket("{UserTicket}"); // Only required if the user is logged in WPCAPI.setDeveloperKey("{DeveloperKey}"); WPCAPI.setNamespace("{ContentNamespace}");
}
</script> |
This is a partial list of site properties; learn about all of the
site properties you can set.
Next:
Step 3: Add User-Generated Content