public string Retweet(string userName, string Nick, long id) { var twitterSecret = new Social_media_access.Models.TwitterSecretData(userName, Nick); var service = new TweetSharp.TwitterService(twitterSecret._OAuthConsumerKey, twitterSecret._OAuthConsumerSecret); service.AuthenticateWith(twitterSecret._OAuthAccessToken, twitterSecret._OAuthAccessTokenSecret); var TwitterStatus = service.Retweet(new RetweetOptions { Id = id }); return("Retweeted successfully"); }
public JsonResult GetHomeTweetsSince(string userName, string Nick, long id) { var twitterSecret = new Social_media_access.Models.TwitterSecretData(userName, Nick); var service = new TweetSharp.TwitterService(twitterSecret._OAuthConsumerKey, twitterSecret._OAuthConsumerSecret); service.AuthenticateWith(twitterSecret._OAuthAccessToken, twitterSecret._OAuthAccessTokenSecret); var _ListTweetsOnHomeTimelineOptions = new TweetSharp.ListTweetsOnHomeTimelineOptions(); _ListTweetsOnHomeTimelineOptions.Count = 11; _ListTweetsOnHomeTimelineOptions.SinceId = id; var tweets = service.ListTweetsOnHomeTimeline(_ListTweetsOnHomeTimelineOptions); return(Json(tweets, JsonRequestBehavior.AllowGet)); }