类型 函数 返回值 无 修订 版本 2024.3703 关键词 广告, Pollfish, setUserDetails 另请参阅 pollfish.init() pollfish.*
设置用户详细信息。提供这些详细信息可能有助于提高针对用户的定向广告收入。
pollfish.setUserDetails( options )
表. 包含选项值的表 — 详情请参阅下一节。
options
表包含用于指定用户详细信息的参数。
字符串. 用户的性别。有效值包括 "male"
(男), "female"
(女)和 "other"
(其他)。
字符串. 用户的 Facebook ID。
字符串. 用户的 Twitter ID。
表. 用户的位置。location
表包含以下用于指定用户位置的参数
请注意,此表仅用于 iOS。对于 Android,您可以通过设置 "android.permission.ACCESS_FINE_LOCATION"
和 "android.permission.ACCESS_COARSE_LOCATION"
权限来自动获取位置信息。
字符串. 用于标识用户的唯一 ID。此 ID 也将通过
local pollfish = require( "plugin.pollfish" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.provider ) end end -- Initialize the Pollfish plugin pollfish.init( adListener, { apiKey="YOUR_API_KEY" } ) -- Set user details pollfish.setUserDetails( { gender="female" } )