Skip to main content

快捷绑定(AutoBindChannel)

AndroidiOSWindows
如果您使用的是 Unity 引擎,请参见 Unity SDK 的 AutoBindChannel

此接口同时支持 LIPASS 账号绑定与第三方渠道绑定。 若用户无 LIPASS 账号,将先完成 LIPASS 创建及绑定流程,再自动绑定指定渠道。

绑定场景:

  • channel131(LIPASS)时,permissionsextraJson 参数可忽略。
  • channel 为其他第三方渠道时,permissionsextraJson 参数可参考 Bind 接口。
note

此接口仅支持移动端和PC Standalone方案,不支持PC Store方案及跨游戏账号关联。

函数定义

UFUNCTION(BlueprintCallable, Category = "LevelInfinite")
static bool AutoBindChannel(
const EINTLLoginChannel Channel,
const FString permissions,
const FString extraJson);

入参说明

ParameterTypeDescription
ChannelEINTLLoginChannel指定绑定的渠道。
更多信息,请参见 EINTLLoginChannel
permissionsstring绑定时授权权限列表,多个权限用逗号分隔
例如 user_info,inapp_friends
extraJsonstring扩展字段

回调处理

LLI PASS 事件的回调,游戏需要处理回调逻辑。更多回调数据结构的信息,请参见 LIEventObserver

回调 LIEventTypeAUTO_BIND_CHANEL_RESULT

代码示例

ULevelInfiniteAPI::AutoBindChannel(EINTLLoginChannel::kChannelDiscord);