/// <summary> /// 初始化数据 /// </summary> /// <param name="key"></param> /// <param name="secret"></param> /// <remarks></remarks> private void InitialIM(string key, string secret) { im = new IM(this.Client.SessionID, key, secret); if (System.String.IsNullOrEmpty(im.Token) == true) { string tokenuser = Client.Session["UserID"].ToString(); if (System.String.IsNullOrEmpty(tokenuser) == false) { //在融云用户初始化,如若报“toke失效”请去融云中查看token是否有效 im.InitialToken(tokenuser, tokenuser, ""); } else { MessageBox.Show("TokenUser Not Be NullOrEmpty!"); } } else { im.InitialToken(); } }