Type Function Return value none Revision 2017.3060 Keywords ads, advertising, KIDOZ, init See also kidoz.load() kidoz.show() kidoz.*
kidoz.init()
initializes the KIDOZ plugin.
Once initialized, you can load an ad using kidoz.load() and subsequently show it via kidoz.show().
This call requires your KIDOZ publisher ID and security token, obtained from the KIDOZ developer portal.
kidoz.init( adListener, params )
Listener. Listener function that will receive adsRequest events.
Table. Table containing KIDOZ initialization values — see the next section for details.
The params
table includes parameters for the KIDOZ initialization.
String. Your publisher ID from KIDOZ.
String. Your security token from KIDOZ.
local kidoz = require( "plugin.kidoz" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.provider ) end end -- Initialize the KIDOZ plugin kidoz.init( adListener, { publisherID="YOUR_PUBLISHER_ID", securityToken="YOUR_SECURITY_TOKEN" } )