Type Function Return value String Revision Release 2024.3703 Keywords ads, advertising, Appnext, getPostback See also appnext.setPostback() appnext.*
Gets the previously set postback parameters.
appnext.getPostback( adKey )
String. The ad key returned for a previously created ad.
local appnext = require( "plugin.appnext" ) local function adListener( event ) print( "Received " .. event.event .. " for " .. event.adKey .. " with message: " .. event.message ) end -- Initialize the Appnext plugin appnext.init( adListener ) -- Create your ads local interstitialPlacementID local platform = system.getInfo( "platformName" ) if ( platform == "iPhone OS" ) then interstitialPlacementID = "YOUR_IOS_INTERSTITIAL_PLACEMENT_ID" elseif ( platform == "Android" ) then interstitialPlacementID = "YOUR_ANDROID_INTERSTITIAL_PLACEMENT_ID" end local interstitialAdKey = appnext.createAd( "interstitial", interstitialPlacementID ) appnext.setPostback( interstitialAdKey, "YOUR_POSTBACK_PARAMS_HERE" ) print( "Postback params set: " .. appnext.getPostback( interstitialAdKey ) )