예제 #1
0
    public void ShareSendHeart(string openId, string title, string desc, string extInfo)
    {
        Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false;

        if (MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform())
        {
            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;
            MonoSingleton <ShareSys> .instance.OnShareCallBack();

            if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ)
            {
                ApolloAccountInfo accountInfo = this.GetAccountInfo(false);
                if (accountInfo != null)
                {
                    string targetUrl = "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=" + accountInfo.OpenId + "&ADTAG=gameobj.msg_heart";
                    string imgUrl    = "http://image.smoba.qq.com/yywj/share_pic/120.png";
                    service.SendToQQGameFriend(1, openId, title, desc, targetUrl, imgUrl, title, "MSG_HEART_SEND", extInfo);
                }
            }
            else
            {
                service.SendToWXGameFriend(openId, title, desc, "9Wste6_dDgZtoVmC6CQTh0jj29kGEp0jrVSYrGWvtZLvSTDN9fUb-_sNjacaGITt", "messageExt", "MSG_heart_send", extInfo);
            }
        }
    }
    public void ShareSendHeartPandroa(int actID, string openId, string title, string desc, string pic_url, string previewText, string gameTag, string extInfo, string mediaId, string messageExt)
    {
        Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false;

        if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform())
        {
            return;
        }
        IApolloSnsService apolloSnsService = IApollo.Instance.GetService(1) as IApolloSnsService;

        MonoSingleton <ShareSys> .instance.OnShareCallBack();

        if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ)
        {
            ApolloAccountInfo accountInfo = this.GetAccountInfo(false);
            if (accountInfo != null)
            {
                string targetUrl = "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=" + accountInfo.OpenId + "&ADTAG=gameobj.msg_heart";
                apolloSnsService.SendToQQGameFriend(actID, openId, title, desc, targetUrl, pic_url, previewText, gameTag, extInfo);
            }
        }
        else
        {
            apolloSnsService.SendToWXGameFriend(openId, title, desc, mediaId, messageExt, gameTag, extInfo);
        }
    }
예제 #3
0
    public void ShareSendHeart(string openId, string title, string desc, string extInfo)
    {
        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.get_Instance().GetService(1) as IApolloSnsService;

        MonoSingleton <ShareSys> .get_instance().OnShareCallBack();

        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_heart";
                string text2 = "http://image.smoba.qq.com/yywj/share_pic/120.png";
                apolloSnsService.SendToQQGameFriend(1, openId, title, desc, text, text2, title, "MSG_HEART_SEND", extInfo);
            }
        }
        else
        {
            apolloSnsService.SendToWXGameFriend(openId, title, desc, "9Wste6_dDgZtoVmC6CQTh0jj29kGEp0jrVSYrGWvtZLvSTDN9fUb-_sNjacaGITt", "messageExt", "MSG_heart_send", extInfo);
        }
    }
    public void ShareInviteFriend(string openId, string title, string desc, string extInfo)
    {
        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)
        {
            DebugHelper.Assert(false, "Texture2D  Share/120 == null");
            return;
        }
        byte[] array = texture2D.EncodeToPNG();
        if (array != null)
        {
            int num = array.Length;
        }
        IApolloSnsService apolloSnsService = IApollo.Instance.GetService(1) as IApolloSnsService;

        if (apolloSnsService == null)
        {
            DebugHelper.Assert(false, "IApollo.Instance.GetService(ApolloServiceType.Sns) == null");
            return;
        }
        MonoSingleton <ShareSys> .instance.OnShareCallBack();

        if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ)
        {
            ApolloAccountInfo accountInfo = this.GetAccountInfo(false);
            if (accountInfo != null)
            {
                string targetUrl = "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=" + accountInfo.OpenId + "&ADTAG=gameobj.msg_invite";
                string imgUrl    = "http://image.smoba.qq.com/yywj/share_pic/120.png";
                apolloSnsService.SendToQQGameFriend(1, openId, title, desc, targetUrl, imgUrl, title, "MSG_INVITE", extInfo);
            }
        }
        else
        {
            apolloSnsService.SendToWXGameFriend(openId, title, desc, "9Wste6_dDgZtoVmC6CQTh0jj29kGEp0jrVSYrGWvtZLvSTDN9fUb-_sNjacaGITt", "messageExt", "MSG_INVITE", extInfo);
        }
    }