personaly.init()

Type Function
Return value none
Revision 2017.3060
Keywords ads, advertising, Persona.ly, init
See also personaly.show()
personaly.*

Overview

personaly.init() initializes the Persona.ly plugin.

Once initialized, you can show an ad using personaly.show().

Note

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.

Syntax

personaly.init( adListener, params )
adListener (required)

Listener. Listener function that will receive adsRequest events.

params (required)

Table. Table containing Persona.ly initialization values — see the next section for details.

Parameter Reference

The params table includes parameters for the Persona.ly initialization.

appHash (required)

String. Your app hash from the Persona.ly portal.

userId (required)

String. A unique user ID for your player.

Example

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" } )