private void OnTagClicked(string tag) { GetSocialUi.CloseView(); demoController.PushMenuSection <ActivitiesSection>(section => { section.Query = ActivitiesQuery.Everywhere().WithTag(tag); }); }
private void OnApplicationPause(bool pauseStatus) { if (!pauseStatus) { GetSocial.WhenInitialized(() => { if (_latestChatId != null) { ShowChat(); } else { GetSocial.GetReferralData( data => { var referralToken = ""; var message = "Referral data: " + data; string promoCode = null; if (data == null) { message = "No referral data"; } else { promoCode = data.ReferralLinkParams.ContainsKey(LinkParams.KeyPromoCode) ? data.ReferralLinkParams[LinkParams.KeyPromoCode] : null; referralToken = data.Token; } if (!referralToken.Equals(_latestReferralData)) { // show popup only if chat is not shown if (_latestChatId == null) { if (promoCode != null) { message += "\n\nPROMO CODE: " + promoCode; } var popup = new MNPopup("Referral Data", message); popup.AddAction("OK", () => { }); if (promoCode != null) { popup.AddAction("Claim Promo Code", () => PromoCodesSection.ClaimPromoCode(promoCode)); } popup.Show(); } _console.LogD(message); _latestReferralData = referralToken; } }, error => _console.LogE("Failed to get referral data: " + error.Message) ); } }); } else { GetSocialUi.CloseView(false); } }
public void PresentChannelInterface(InviteChannel inviteChannel, InvitePackage invitePackage, Action onComplete, Action onCancel, Action <GetSocialError> onFailure) { GetSocialDebugLogger.D(string.Format("FacebookSharePlugin.PresentChannelInterface(), inviteChannel: {0}, invite package: {1}", inviteChannel, invitePackage)); // GetSocialUi needs to be closed while Facebook activity is opened // because othewise it cannot deliever the result back to the app GetSocialUi.CloseView(true); SendInvite(invitePackage.ReferralDataUrl, onComplete, onCancel, onFailure); }
private void OnApplicationPause(bool pauseStatus) { if (!pauseStatus) { GetSocial.AddOnInitializedListener(() => { if (_latestChatId != null) { ShowChat(); } }); } else { GetSocialUi.CloseView(false); } }
public void PresentChannelInterface(InviteChannel inviteChannel, InvitePackage invitePackage, Action onComplete, Action onCancel, Action <GetSocialError> onFailure) { GetSocialDebugLogger.D(string.Format("FacebookInvitePlugin.PresentChannelInterface(), inviteChannel: {0}, invite package: {1}", inviteChannel, invitePackage)); #if UNITY_ANDROID && USE_GETSOCIAL_UI // Get Social UI needs to be closed while Facebook activity is opened // because othewise it cannot deliever the result back to the app GetSocialUi.CloseView(true); #endif Uri imageUri = null; if (invitePackage.ImageUrl != null) { imageUri = new Uri(invitePackage.ImageUrl); } SendInvite(invitePackage.ReferralDataUrl, imageUri, onComplete, onCancel, onFailure); }