public void ShareRedBox(int shareType, string url, string title, string desc) { if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform()) { return; } Texture2D texture2D = Resources.Load("Share/redbox", typeof(Texture2D)) as Texture2D; byte[] array = texture2D.EncodeToPNG(); int num = 0; if (array != null) { num = array.Length; } IApolloSnsService apolloSnsService = IApollo.get_Instance().GetService(1) as IApolloSnsService; if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 2) { string text = "http://image.smoba.qq.com/yywj/share_pic/redbox.png"; apolloSnsService.SendToQQ(shareType, title, desc, url, text); } else if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 1) { apolloSnsService.SendToWeixinWithUrl(shareType, title, desc, url, "MSG_INVITE", array, num, "message Ext"); } }
public void ShareQQBox(string actID, string boxID, string title, string desc) { Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false; if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform()) { return; } Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D; byte[] array = texture2D.EncodeToPNG(); if (array != null) { int num = array.Length; } IApolloSnsService apolloSnsService = IApollo.Instance.GetService(1) as IApolloSnsService; if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ) { this.m_bShareQQBox = true; string url = string.Format("http://gamecenter.qq.com/giftbox/release/index/grap.html?actid={0}&_wv=1031&boxid={1}&appid={2}", actID, boxID, ApolloConfig.appID); string thumbImageUrl = "http://image.smoba.qq.com/yywj/share_pic/120.png"; apolloSnsService.SendToQQ(ApolloShareScene.QSession, title, desc, url, thumbImageUrl); } }
public void InviteFriendToRoom(string title, string desc, string roomInfo) { Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false; if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform()) { return; } Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D; byte[] array = null; if (texture2D) { array = texture2D.EncodeToPNG(); } int thumbDataLen = 0; if (array != null) { thumbDataLen = array.Length; } IApolloSnsService apolloSnsService = IApollo.Instance.GetService(1) as IApolloSnsService; if (apolloSnsService == null) { return; } if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ) { ApolloAccountInfo accountInfo = this.GetAccountInfo(false); if (accountInfo != null) { string url = string.Concat(new string[] { "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=", accountInfo.OpenId, "&ADTAG=gameobj.msg_invite&", ApolloHelper.QQ_SHARE_GAMEDATA, "=", roomInfo }); string thumbImageUrl = "http://image.smoba.qq.com/yywj/share_pic/120.png"; apolloSnsService.SendToQQ(ApolloShareScene.QSession, title, desc, url, thumbImageUrl); } } else { apolloSnsService.SendToWeixin(title, desc, "MSG_INVITE", array, thumbDataLen, roomInfo); } }
public void ShareRecruitFriend(string title, string desc, string roomInfo) { if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform()) { return; } Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D; byte[] array = null; if (texture2D) { array = texture2D.EncodeToPNG(); } int imageDataLen = 0; if (array != null) { imageDataLen = array.Length; } IApolloSnsService apolloSnsService = IApollo.Instance.GetService(1) as IApolloSnsService; if (apolloSnsService == null) { return; } if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ) { ApolloAccountInfo accountInfo = this.GetAccountInfo(false); if (accountInfo != null) { string url = "http://youxi.vip.qq.com/m/act/b1068bb755_sgame_104290.html?_wv=1&QQ_SHARE_GAMEDATA=" + roomInfo; string thumbImageUrl = "http://image.smoba.qq.com/yywj/share_pic/120.png"; apolloSnsService.SendToQQ(ApolloShareScene.QSession, title, desc, url, thumbImageUrl); } } else { ApolloAccountInfo accountInfo2 = this.GetAccountInfo(false); if (accountInfo2 != null) { string url2 = string.Format("http://game.weixin.qq.com/cgi-bin/act?actid=4381&messageExt={0}&k=bZML6lvwyQRcCItiE6oDJg&q=0&jsapi_ticket=1#wechat_redirect", roomInfo); apolloSnsService.SendToWeixinWithUrl(ApolloShareScene.Session, title, desc, url2, "MSG_INVITE", array, imageDataLen, roomInfo); } } }
public void ShareQQBox(string actID, string boxID, string title, string desc) { byte[] buffer = (Resources.Load("Share/120", typeof(Texture2D)) as Texture2D).EncodeToPNG(); int length = 0; if (buffer != null) { length = buffer.Length; } IApolloSnsService service = IApollo.Instance.GetService(1) as IApolloSnsService; if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ) { string url = string.Format("http://gamecenter.qq.com/giftbox/release/index/grap.html?actid={0}&_wv=1031&boxid={1}&appid={2}", actID, boxID, ApolloConfig.appID); string thumbImageUrl = "http://image.smoba.qq.com/yywj/share_pic/120.png"; Debug.Log("QQBox apollo targturl " + url); service.SendToQQ(ApolloShareScene.QSession, title, desc, url, thumbImageUrl); } }
public void InviteQQFriendToRoom(string title, string desc, string roomInfo) { byte[] buffer = (Resources.Load("Share/120", typeof(Texture2D)) as Texture2D).EncodeToPNG(); int length = 0; if (buffer != null) { length = buffer.Length; } IApolloSnsService service = IApollo.Instance.GetService(1) as IApolloSnsService; if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ) { ApolloAccountInfo accountInfo = this.GetAccountInfo(false); string url = "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=" + accountInfo.OpenId + "&ADTAG=gameobj.msg_invite&gamedata=" + roomInfo; string thumbImageUrl = "http://image.smoba.qq.com/yywj/share_pic/120.png"; service.SendToQQ(ApolloShareScene.QSession, title, desc, url, thumbImageUrl); } }
public void ShareToFriend(string title, string desc) { Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false; if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform()) { return; } Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D; if (texture2D == null) { return; } byte[] array = texture2D.EncodeToPNG(); int num = 0; if (array != null) { num = array.Length; } IApolloSnsService apolloSnsService = IApollo.get_Instance().GetService(1) as IApolloSnsService; if (apolloSnsService == null) { return; } if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 2) { ApolloAccountInfo accountInfo = this.GetAccountInfo(false); if (accountInfo != null) { string text = "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=" + accountInfo.get_OpenId() + "&ADTAG=gameobj.msg_invite"; string text2 = "http://image.smoba.qq.com/yywj/share_pic/120.png"; apolloSnsService.SendToQQ(2, title, desc, text, text2); } } else { apolloSnsService.SendToWeixin(title, desc, "MSG_INVITE", array, num, "SendToWeixin_extInfo"); } }
public void ShareRecruitFriend(string title, string desc, string roomInfo) { if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform()) { return; } Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D; byte[] array = null; if (texture2D) { array = texture2D.EncodeToPNG(); } int num = 0; if (array != null) { num = array.Length; } IApolloSnsService apolloSnsService = IApollo.get_Instance().GetService(1) as IApolloSnsService; if (apolloSnsService == null) { return; } if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 2) { ApolloAccountInfo accountInfo = this.GetAccountInfo(false); if (accountInfo != null) { string text = "http://youxi.vip.qq.com/m/act/b1068bb755_sgame_104290.html?_wv=1&QQ_SHARE_GAMEDATA=" + roomInfo; string text2 = "http://image.smoba.qq.com/yywj/share_pic/120.png"; apolloSnsService.SendToQQ(2, title, desc, text, text2); } } else { apolloSnsService.SendToWeixin(title, desc, "MSG_INVITE", array, num, roomInfo); } }
public void ShareToFriend(string title, string desc) { byte[] thumbImgData = (Resources.Load("Share/120", typeof(Texture2D)) as Texture2D).EncodeToPNG(); int thumbDataLen = 0; if (thumbImgData != null) { thumbDataLen = thumbImgData.Length; } IApolloSnsService service = IApollo.Instance.GetService(1) as IApolloSnsService; if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ) { ApolloAccountInfo accountInfo = this.GetAccountInfo(false); string url = "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=" + accountInfo.OpenId + "&ADTAG=gameobj.msg_invite"; string thumbImageUrl = "http://image.smoba.qq.com/yywj/share_pic/120.png"; service.SendToQQ(ApolloShareScene.QSession, title, desc, url, thumbImageUrl); } else { service.SendToWeixin(title, desc, "MSG_INVITE", thumbImgData, thumbDataLen, "SendToWeixin_extInfo"); } }
public void ShareRedBox(int shareType, string url, string title, string desc, Texture2D tex, string imgurl) { if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform()) { return; } byte[] array = tex.EncodeToPNG(); int imageDataLen = 0; if (array != null) { imageDataLen = array.Length; } IApolloSnsService apolloSnsService = IApollo.Instance.GetService(1) as IApolloSnsService; if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ) { apolloSnsService.SendToQQ((ApolloShareScene)shareType, title, desc, url, imgurl); } else if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.Wechat) { apolloSnsService.SendToWeixinWithUrl((ApolloShareScene)shareType, title, desc, url, "MSG_INVITE", array, imageDataLen, "message Ext"); } }