public string TicketTwitterReply(string message, string profileid, string statusid) { Domain.Socioboard.Domain.TwitterAccount objTwitterAccount = objTwitterAccountRepository.getUserInformation(profileid); oAuthTwitter OAuthTwt = new oAuthTwitter(); OAuthTwt.AccessToken = objTwitterAccount.OAuthToken; OAuthTwt.AccessTokenSecret = objTwitterAccount.OAuthSecret; OAuthTwt.TwitterScreenName = objTwitterAccount.TwitterScreenName; OAuthTwt.TwitterUserId = objTwitterAccount.TwitterUserId; this.SetCofigDetailsForTwitter(OAuthTwt); Tweet twt = new Tweet(); JArray replypost = twt.Post_StatusesUpdate(OAuthTwt, message, statusid); return new JavaScriptSerializer().Serialize(replypost); }
public string TwitterReplyUpdate(string message, string userid, string profileid, string statusid) { Domain.Socioboard.Domain.TwitterAccount objTwitterAccount = objTwitterAccountRepository.GetUserInformation(Guid.Parse(userid), profileid); oAuthTwitter OAuthTwt = new oAuthTwitter(ConfigurationManager.AppSettings["consumerKey"], ConfigurationManager.AppSettings["consumerSecret"], ConfigurationManager.AppSettings["callbackurl"]); OAuthTwt.AccessToken = objTwitterAccount.OAuthToken; OAuthTwt.AccessTokenSecret = objTwitterAccount.OAuthSecret; OAuthTwt.TwitterScreenName = objTwitterAccount.TwitterScreenName; OAuthTwt.TwitterUserId = objTwitterAccount.TwitterUserId; this.SetCofigDetailsForTwitter(OAuthTwt); Tweet twt = new Tweet(); JArray replypost = new JArray(); if (!string.IsNullOrEmpty(statusid)) { replypost = twt.Post_StatusesUpdate(OAuthTwt, message, statusid); } else { replypost = twt.Post_StatusesUpdate(OAuthTwt, message); } return new JavaScriptSerializer().Serialize(replypost); }