Type Function Return value none Revision 2017.3060 Keywords ads, advertising, Persona.ly, init See also personaly.show() personaly.*
personaly.init()
initializes the Persona.ly plugin.
Once initialized, you can show an ad using personaly.show().
This call requires an app hash and a unique user ID for each player. Your app hash can be obtained from the Persona.ly portal.
personaly.init( adListener, params )
Listener. Listener function that will receive adsRequest events.
Table. Table containing Persona.ly initialization values — see the next section for details.
The params
table includes parameters for the Persona.ly initialization.
String. Your app hash from the Persona.ly portal.
String. A unique user ID for your player.
local personaly = require( "plugin.personaly" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.provider ) end end -- Initialize the Persona.ly plugin personaly.init( adListener, { appHash="YOUR_APP_HASH", userId="UNIQUE_USER_ID" } )