/// <summary> /// 发布一条新微博 /// </summary> /// <param name="channelName"></param> /// <param name="channelUrl"></param> /// <param name="message"></param> protected override void SocialSharePublish(string channelName, string channelUrl, string message, SocialBase.SocialShareHandler callBack) { var social = SocialViewModel.Instance.DataInfos[SocialType.TENCENT]; OAuthConfigruation.AccessToken = new AccessToken(social.AcessToken); var share = new TService(); var arg = new ServiceArgument() { Content = message, Url = channelUrl }; try { share.AddVideo(arg, obj => { if (obj.Succeed) callBack(true, string.Empty); else callBack(false, obj.InnerException.Message); }); } catch (Exception ex) { callBack(false, ex.Message); } }
/// <summary> /// 发布一条新微博 /// </summary> /// <param name="channelName"></param> /// <param name="channelUrl"></param> /// <param name="message"></param> protected override void SocialSharePublish(string channelName, string channelUrl, string message, SocialBase.SocialShareHandler callBack) { var social = SocialViewModel.Instance.DataInfos[SocialType.TENCENT]; OAuthConfigruation.AccessToken = new AccessToken(social.AcessToken); var share = new TService(); var arg = new ServiceArgument() { Content = message, Url = channelUrl }; try { share.AddVideo(arg, obj => { if (obj.Succeed) { callBack(true, string.Empty); } else { callBack(false, obj.InnerException.Message); } }); } catch (Exception ex) { callBack(false, ex.Message); } }