Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GetSocial.GetReferralData(onSuccess: (referralData) => {
- if (referralData != null) {
- _needToShowBeingInvitedFriendWindow = true;
- _saveManager.Save();
- var scenario = _poolManager.Create<ShowWindowScenario>(
- LogicAtomWindow.INVITED_FRIEND_REWARD_WINDOW, new Dictionary<TypeOfParam, object>(), true);
- _scenariosQueue.AddScenario(
- new ExtendedScenario(
- scenario, new MultiplePopupCondition(
- new List<IScenarioCondition> {
- _poolManager.Create<AppLoadingFinishedCondition>(),
- _poolManager.Create<NoLoadingLevelCondition>(),
- _poolManager.Create<TopWindowCondition>(LogicAtomWindow.HUD),
- _poolManager.Create<NoTutorialsCondition>(),
- _poolManager.Create<NoScenariosLockersCondition>(),
- })));
- Debug.Log("Got referral data!");
- if (referralData.LinkParams != null) {
- foreach (var link in referralData.LinkParams) {
- Debug.Log("Link: " + link.Key + " " + link.Value);
- }
- }
- else {
- Debug.Log("No link is found!");
- }
- Debug.Log("Referred user id:" + referralData.ReferrerUserId);
- Debug.Log("Referred token:" + referralData.Token);
- Debug.Log("Referred metadata:" + referralData.IsGuaranteedMatch);
- Debug.Log("App started with referral data: " + referralData);
- }
- else {
- Debug.Log("No referral data found");
- }
- }, onFailure: (error) => Debug.LogError("Failed to retrieve referral data, error: " + error.Message));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement