protected void Load(TwitterResource resource)
        {
            var service = new TwitterService(SensitiveData.ConsumerToken, SensitiveData.ConsumerSecret, resource.User.Key, resource.User.Secret);

            switch (resource.Type)
            {
                case ResourceType.Home:
                    service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions { Count = 1, IncludeEntities = true }, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Mentions:
                    service.ListTweetsMentioningMe(new ListTweetsMentioningMeOptions { Count = 1, IncludeEntities = true }, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Messages:
                    service.ListDirectMessagesReceived(new ListDirectMessagesReceivedOptions { Count = 1 }, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Favorites:
                    service.ListFavoriteTweets(new ListFavoriteTweetsOptions { Count = 1 }, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.List:
                    service.ListTweetsOnList(new ListTweetsOnListOptions
                    {
                        IncludeRts = false,
                        Count = 1,
                        OwnerScreenName = resource.Data.Substring(1, resource.Data.IndexOf('/') - 1),
                        Slug = resource.Data.Substring(resource.Data.IndexOf('/') + 1)
                    }, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Search:
                    service.Search(new SearchOptions { Count = 1, IncludeEntities = true, Q = resource.Data }, (status, response) => ReceiveTweetable(status.Statuses.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Tweets:
                    service.ListTweetsOnUserTimeline(new ListTweetsOnUserTimelineOptions { Count = 1, ScreenName = resource.Data, IncludeRts = true }, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
            }
        }
        public ActionResult Index()
        {
            if (Request.IsAuthenticated)
            {
                var claimsIdentity = HttpContext.User.Identity as ClaimsIdentity;
                var claims = claimsIdentity.Claims;

                var accessTokenClaim = claims.FirstOrDefault(x => x.Type == Startup.TwitterAccessTokenClaimType);
                var accessTokenSecretClaim =
                    claims.FirstOrDefault(x => x.Type == Startup.TwitterAccessTokenSecretClaimType);

                if (accessTokenClaim != null && accessTokenSecretClaim != null)
                {
                    var service = new TwitterService(
                        Startup.TwitterConsumerKey,
                        Startup.TwitterConsumerSecret,
                        accessTokenClaim.Value,
                        accessTokenSecretClaim.Value
                        );

                    ViewBag.Tweets = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());
                }
            }
            return View();
        }
Exemple #3
0
        private void Connect(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret)
        {
            // In v1.1, all API calls require authentication
            var service = new TwitterService(consumerKey, consumerSecret);
            service.AuthenticateWith(accessToken, accessTokenSecret);

            Log("Connected");

            TwitterRateLimitStatusSummary rate = service.GetRateLimitStatus(new GetRateLimitStatusOptions());

            Log("Limimte rate: " + rate.RawSource);

            var tweets = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());
            foreach (var tweet in tweets)
            {
                Console.WriteLine("{0} says '{1}'", tweet.User.ScreenName, tweet.Text);
            }

            TwitterCursorList<TwitterUser> friends = service.ListFollowers(new ListFollowersOptions());

            Log("Friends: " + friends.Count);

            foreach (var friend in friends)
            {
                Log(String.Format("Friend: {0}", friend.Name));
            }
        }
Exemple #4
0
        protected void Load(TwitterResource resource)
        {
            var service = new TwitterService(SensitiveData.ConsumerToken, SensitiveData.ConsumerSecret, resource.User.Key, resource.User.Secret);

            switch (resource.Type)
            {
                case ResourceType.Home:
                    service.ListTweetsOnHomeTimeline(1, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Mentions:
                    service.ListTweetsMentioningMe(1, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Messages:
                    service.ListDirectMessagesReceived(1, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Favorites:
                    service.ListFavoriteTweets((status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.List:
                    service.ListTweetsOnList(resource.Data.Substring(1, resource.Data.IndexOf('/') - 1),
                            resource.Data.Substring(resource.Data.IndexOf('/') + 1), 1, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Search:
                    service.Search(resource.Data, 1, 20, (status, response) => ReceiveTweetable(status.Statuses.Cast<ITweetable>(), response, resource));
                    break;
                case ResourceType.Tweets:
                    service.ListTweetsOnSpecifiedUserTimeline(resource.Data, 1, true, (status, response) => ReceiveTweetable(status.Cast<ITweetable>(), response, resource));
                    break;
            }
        }
Exemple #5
0
        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));
        }
        /// <summary>
        /// Gets all the users tweets.
        /// </summary>
        /// <returns></returns>
        public IList<Tweet> GetAllTweets()
        {
            List<Tweet> tweets = new List<Tweet>();

            TwitterService twitterService = new TwitterService(AuthenticationTokens.TwitterConsumerKey, AuthenticationTokens.TwitterConsumerSecret);
            twitterService.AuthenticateWith(AuthenticationTokens.TwitterConsumerKey, AuthenticationTokens.TwitterConsumerSecret,
                                      _authentication.AccessToken, _authentication.AccessTokenSecret);

            TwitterUser twitterUser = twitterService.VerifyCredentials();

            //ListTweetsOnHomeTimeline only returns 200 (or 800?) results each go. Need to send the requests a few times per hour
            //with the paging/counts set?
            IEnumerable<TwitterStatus> returnedTweets = null;

            //try it a few times
            int retryCount = 0;
            while (returnedTweets == null)
            {
                returnedTweets = twitterService.ListTweetsOnHomeTimeline(200);

                retryCount++;

                //give up after 5 retries
                if (retryCount == 5)
                    return tweets;
            }

            foreach (var returnedTweet in returnedTweets)
            {
                Tweet tweet = new Tweet();

                TwitterStatus statusToExamine = returnedTweet;

                if (returnedTweet.RetweetedStatus != null)
                {
                    statusToExamine = returnedTweet.RetweetedStatus;

                }

                tweet.Author = new Linker() { Id = statusToExamine.Author.ScreenName, Name = statusToExamine.Author.ScreenName };
                tweet.Content = statusToExamine.Text;
                tweet.DatePosted = statusToExamine.CreatedDate;
                tweet.TweetId = statusToExamine.Id;
                tweet.ReTweetCount = GetRetweetCountFromRawData(statusToExamine.RawSource);

                tweets.Add(tweet);
            }
            return tweets;
        }
Exemple #7
0
 public IEnumerable<TwitterStatus> GetSelectedTweets()
 {
     IEnumerable<TwitterStatus> tweets = null;
     try
     {
         var service = new TwitterService(_consumerKey, _consumerSecret);
         service.AuthenticateWith(_accessToken, _accessTokenSecret);
         tweets = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions()).Take(5);
         foreach (var tweet in tweets)
         {
             Console.WriteLine("{0} says '{1}'", tweet.User.ScreenName, tweet.Text);
         }
     }
     catch (Exception ex)
     {
     }
     return tweets;
 }
        // GET api/values
        public IEnumerable<Tweet> Get()
        {
            var tweets = new List<Tweet>();

            var service = new TwitterService(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);
            service.AuthenticateWith(OAUTH_TOKEN, OAUTH_TOKEN_SECRET);

            foreach (var serviceTweet in service.ListTweetsOnHomeTimeline(5))
            {
                var tweet = new Tweet()
                {
                    CreatedDate = serviceTweet.CreatedDate,
                    Id = serviceTweet.Id.ToString(),
                    Text = serviceTweet.Text,
                    UserName = serviceTweet.Author.ScreenName
                };
                tweets.Add(tweet);
            }
            return tweets;
        }
        public ActionResult ListInc()
        {
            // In v1.1, all API calls require authentication
            var service = new TwitterService(_consumerKey, _consumerSecret);
            service.AuthenticateWith(_accessToken, _accessTokenSecret);

            IEnumerable<TwitterStatus> tweets = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());
            foreach (TwitterStatus tweet in tweets)
            {
                ViewBag.Tweet = tweet.Text;
            }

            return View();
        }
        private void GetTweets()
        {
            TweetList.DataContext = _tweets;
            _tweets.Clear();
            int twitterCount = 0;
            var service = new TwitterService("gdszkrjT9BXALsntZI3BxQ", "ltpb4xzjzxRf1w9Sq6wqhwOBfDNCKpWDcUkQyth5MeE");
            service.AuthenticateWith("1966078789-R92gYWO9THXuYJ5uE6DkifcQ9mDLEZFT6dgUcuH",
                "g3Jb0b8BSt4CgSDrWJMatw6DaXwtocPk4kMhX52jnq4");

            IEnumerable<TwitterStatus> tweets = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());

            try
            {
                foreach (TwitterStatus tweet in tweets)
                {
                    if (twitterCount < 6)
                    {
                        String name = tweet.User.ScreenName;
                        String status = tweet.Text;
                        String timeString;
                        DateTime time = tweet.CreatedDate.ToLocalTime();
                        TimeSpan timePassed = DateTime.Now.Subtract(time);
                        if (timePassed.TotalSeconds < 60)
                        {
                            var timeInt = (int) (Math.Floor(timePassed.TotalSeconds));
                            timeString = timeInt.ToString("N0") + " seconds ago";
                        }
                        else if (timePassed.TotalMinutes < 60)
                        {
                            var timeInt = (int) (Math.Floor(timePassed.TotalMinutes));
                            timeString = timeInt.ToString("N0") + " minutes ago";
                        }
                        else if (timePassed.TotalHours < 24)
                        {
                            var timeInt = (int) Math.Floor(timePassed.TotalHours);
                            timeString = timeInt.ToString("N1") + " hours ago";
                        }
                        else
                        {
                            var timeInt = (int) (Math.Floor(timePassed.TotalDays));
                            timeString = timeInt.ToString("N1") + " days ago";
                        }

                        _tweets.Add(new Tweet("@" + name, status, timeString.Replace(".0", "")));
                        twitterCount++;
                    }
                }
            }
            catch (NullReferenceException)
            {
            }
        }
        void AccessTokenQuery_QueryResponse(object sender, WebQueryResponseEventArgs e)
        {
            try
            {
                StreamReader reader = new StreamReader(e.Response);
                string strResponse = reader.ReadToEnd();
                var parameters = MainUtil.GetQueryParameters(strResponse);

                ObjCommon.Twittertoken = parameters["oauth_token"];
                ObjCommon.TwitterAccessTokenSecret = parameters["oauth_token_secret"];
                ObjCommon.TwitterScreenName = parameters["screen_name"];
                ObjCommon.SaveSettings();
                userLoggedIn();
                if (userID != "" && userScreenName != "")
                {
                    var service = new TwitterService(consumerKey, consumerKeySecret);
                    service.AuthenticateWith(accessToken.ToString(), accessTokenSecret);

                    service.ListTweetsOnHomeTimeline(new TweetSharp.ListTweetsOnHomeTimelineOptions() { Count = 20 }, (ts, rep) =>
                    {

                        if (rep.StatusCode == HttpStatusCode.OK)
                        {

                        }
                    });
                }
            }
            catch (Exception ex)
            {
                Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show(ex.Message);
                });
            }
        }
Exemple #12
0
        private void twitterToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            TwitterClientInfo twitterClientInfo = new TwitterClientInfo();
            twitterClientInfo.ConsumerKey = consumerKey; //Read ConsumerKey out of the app.config
            twitterClientInfo.ConsumerSecret = consumerSecret; //Read the ConsumerSecret out the app.config
            TwitterService twitterService = new TwitterService(consumerKey, consumerSecret);
            requestToken = twitterService.GetRequestToken();
            if (AdvancedSoftwareProject.Properties.Settings.Default.AccessToken != "" && AdvancedSoftwareProject.Properties.Settings.Default.AccessTokenSecret != "")
            {
                try
                {
                    twitterService.AuthenticateWith(AdvancedSoftwareProject.Properties.Settings.Default.AccessToken, AdvancedSoftwareProject.Properties.Settings.Default.AccessTokenSecret);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                    authTwitter(twitterService);
                }
            }
            else
            {
                authTwitter(twitterService);
            }
            var options = new ListTweetsOnHomeTimelineOptions();
            var currentTweets = twitterService.ListTweetsOnHomeTimeline(options);
            List<TwitterStatus> tweets = currentTweets.ToList();
            //tweets[i].User.ScreenName

            //See https://github.com/danielcrenna/tweetsharp for more info on how to use tweets etc

            twitterFeed.DocumentText = "";
            string twitterHTML = "<div style = \"color:0099FF\">";

            for (int i = 0; i < tweets.Count; i++)
            {
                if (i != tweets.Count - 1)
                {
                    twitterHTML = twitterHTML + tweets[i].TextAsHtml + "<br><br>";
                }
                else
                {
                    twitterHTML = twitterHTML + tweets[i].TextAsHtml + "</div>";
                }
            }

            twitterFeed.DocumentText = twitterHTML;
        }
        public List<SportsBuzzTweet> GetTwitterData(string username, string filter)
        {
            List<TwitterStatus> tweets = new List<TwitterStatus>();
            TwitterService service;

            if (filter == "NBA" || filter == "All")
            {
                service = new TwitterService("evXjkuCvpwXKBWlnzPaDlw", "6WAwfe87ZAMYSpmh2JvtxfoOwS7lZdMyOQ0aZytsYU");
                service.AuthenticateWith("1146287640-bXJoH4wh5vTkFdQLIbl2xcmx4iyl4lWOybzqNfp", "yqd2izA8mvYULBM3y9Z7TQdxWabPhcRmn53GKk9eQ");
                tweets.AddRange(service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions() { Count = 200 }).ToList());
                //tweets = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions() { Count = 200 }).ToList();
            }

            if (filter == "NFL" || filter == "All")
            {
                service = new TwitterService("Pcg1nt7s1TGHHCmfph80oQ", "Gda56oYVh7a4lKCCBLbWW6EhwYgj5sSQFwBivBYag");
                service.AuthenticateWith("1450834111-WDeHWOxcCujGYbkibfVWj8doZ9XeAczbMyLgpPA", "lClYwynFhpOWWUm3iAUFuqzIOHakQczlavFZdODJ8g");
                tweets.AddRange(service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions() { Count = 200 }).ToList());
                //tweets = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions() { Count = 200 }).ToList();
            }
            //   var service = new TwitterService(_consumerKey, _consumerSecret);
            //service.AuthenticateWith(_accessToken, _accessTokenSecret);

            tweets = tweets.OrderBy(c => c.CreatedDate).ToList();
            List<SportsBuzzTweet> sbTweets = new List<SportsBuzzTweet>();
            SportsBuzzTweet sbTweet;
            foreach (var tweet in tweets)
            {
                sbTweet = new SportsBuzzTweet();
                sbTweet.ProfileImageUrl = tweet.User.ProfileImageUrl;
                sbTweet.ScreenName = tweet.User.ScreenName;
                //if (filter == "NBA")
                //    sbTweet.TweetText = "***NBA***" + tweet.Text;
                //else
                sbTweet.TweetText = tweet.Text;
                sbTweets.Add(sbTweet);

                Console.WriteLine("{0} says '{1}'", tweet.User.ScreenName, tweet.Text);
            }

            return sbTweets;

            //return tweets.ToList();

            //string url = "http://twitter.com/statuses/friends_timeline.xml";
            ////string user = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(username + ":" + password));
            //HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
            //request.Method = "POST"; // <--- you probably need to change this to a GET after a twitter change a couple of months ago.
            //string password = "******";
            //request.Credentials = new NetworkCredential(username, password);
            //WebResponse response = request.GetResponse();
            //StreamReader reader = new StreamReader(response.GetResponseStream());
            //string responseString = reader.ReadToEnd();
            //reader.Close();
            //XmlDocument xmld = new XmlDocument();
            //xmld.LoadXml(responseString);
            //XDocument document = XDocument.Parse(responseString);

            //var query = from e in document.Root.Descendants()
            //            where e.Element("user") != null
            //            select new UserStatusSvc
            //            {
            //                UserName = e.Element("user").Element("screen_name").Value,
            //                ProfileImage = e.Element("user").Element("profile_image_url").Value,
            //                Status = HttpUtility.HtmlDecode(e.Element("text").Value),
            //                StatusDate = e.Value.ParseDateTime().ToString()
            //            };

            //var users = (from u in query
            //             where u.Status != ""
            //             select u).ToList();

            //return (users.ToArray());
        }
        public static List<ModelTwitterFeedsDetails> GetTwitterTweets(string ScreenName)
        {
            ModelTwitterFeeds modelTwitterFeeds = new ModelTwitterFeeds();
            List<ModelTwitterFeedsDetails> lstModelTwitterFeedsDetail = new List<ModelTwitterFeedsDetails>();
            try
            {
                /*>>> API Creadentials <<<<////
                >> Under Informnation is creating from Personal Account Information API
                >> For any change in this credentials Login Account : [email protected]
                >> API Name : News Get Application
                >> Please don't change any word without permission from following API Admin*/
                string _consumerKey = "cvRCCaqLUlM9SyolFwYEQQ2uZ";
                string _consumerSecret = "sVvOgCPwuzXo37v4qjAriGbftwEefMC9xNadPQLTsoOkeqiJ8C";
                string _accessToken = "65042389-YQ3jLfP1RWu9Q7So9VAj3Rc3J9oMB0Suuv0jlioAN";
                string _accessTokenSecret = "yHMVHihkHAaCIOJi2M9WEOq4fpODY1a0hdS92J9OZEJEL";
                // API access Data End

                var service = new TwitterService(_consumerKey, _consumerSecret);
                //var tweets = new ListTweetsOnHomeTimelineOptions();
                service.AuthenticateWith(_accessToken, _accessTokenSecret);
                IAsyncResult result = service.BeginListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());
                IEnumerable<TwitterStatus> tweets = service.EndListTweetsOnHomeTimeline(result);

                foreach (var tweet in tweets)
                {
                    if (tweets != null)
                    {
                        modelTwitterFeeds.FeedId = 0;
                        modelTwitterFeeds.UserPageId = 0;
                        modelTwitterFeeds.UserPageTitle = String.Empty;
                        modelTwitterFeeds.UserScreenName = String.Empty;
                        modelTwitterFeeds.UserPageLanguage = String.Empty;
                        modelTwitterFeeds.UserPageFollowers = 0;
                        modelTwitterFeeds.UserPageCoverImageURL = String.Empty;
                        modelTwitterFeeds.UserPageLogoImage = String.Empty;
                    }

                    var st1 = tweet.Text; //string
                    var st2 = tweet.Source; //string
                    var st3 = tweet.TextAsHtml; //string
                    var st4 = tweet.TextDecoded; //string
                    var st5 = tweet.RetweetedStatus; //TwitterStatus
                    var st6 = tweet.RetweetCount; //int
                    var st7 = tweet.RawSource; //string
                    var st8 = tweet.Place; //TwitterPlace
                    var st9 = tweet.Location; //TwitterGeoLocation
                    var st10 = tweet.Language; //string
                    var st11 = tweet.IsTruncated; //bool
                    var st12 = tweet.IsRetweeted; //bool
                    var st13 = tweet.IsPossiblySensitive; //bool is nullable
                    var st14 = tweet.IsFavorited; //bool
                    var st15 = tweet.InReplyToUserId; //long is nullable
                    var st16 = tweet.InReplyToStatusId; //long is nullable
                    var st17 = tweet.InReplyToScreenName; //string
                    var st18 = tweet.IdStr; //string
                    var st19 = tweet.Id; //long
                    var st20 = tweet.FavoriteCount; //int
                    var st21 = tweet.ExtendedEntities; //TwitterExtendedEntities
                    var st22 = tweet.Entities; //TwitterEntities
                    var st23 = tweet.CreatedDate; //DateTime
                    var st24 = tweet.Author; //ITweeter

                }

                //TwitterAccount user = new TwitterAccount.
                //TwitterUser twitterUser =
                //>>GET OTHER USER TIMELINE//BeginListTweetsOnHomeTimeline

                TwitterService t_service = new TwitterService(_consumerKey, _consumerSecret);
                t_service.AuthenticateWith(_accessToken, _accessTokenSecret);
                var t_options = new ListTweetsOnHomeTimelineOptions();
                t_options.ExcludeReplies = true;
                var t_tweets = t_service.ListTweetsOnHomeTimeline(t_options);
                //ListTweetsOnSpecifiedUserTimeline
                string ScreenNameBBCArabic = "BBCArabic";
                string ScreenNameCNNArabic = "cnnarabic";
                string ScreenName1 = "garbo_speaks";
                var User_OptionInit = new ListTweetsOnUserTimelineOptions { ScreenName = ScreenNameCNNArabic, Count = 200, ExcludeReplies = true };
                var User_Tweets = service.ListTweetsOnUserTimeline(User_OptionInit);

                string TweetText = String.Empty;

                foreach (var tweet in User_Tweets)
                {
                    var userDetail = tweet.User;
                    if (false)
                    {
                        var us1 = tweet.User.ContributorsEnabled; //bool?
                        var us2 = tweet.User.CreatedDate;
                        var us3 = tweet.User.Description;
                        var us4 = tweet.User.FavouritesCount;
                        var us5 = tweet.User.FollowersCount;
                        var us6 = tweet.User.FollowRequestSent;
                        var us7 = tweet.User.FriendsCount;
                        var us8 = tweet.User.Id;
                        var us9 = tweet.User.IsDefaultProfile;
                        var us10 = tweet.User.IsGeoEnabled;
                        var us11 = tweet.User.IsProfileBackgroundTiled;
                        var us12 = tweet.User.IsProtected;
                        var us13 = tweet.User.IsTranslator;
                        var us14 = tweet.User.IsVerified;
                        var us15 = tweet.User.Language;
                        var us16 = tweet.User.ListedCount;
                        var us17 = tweet.User.Location;
                        var us18 = tweet.User.Name;
                        var us19 = tweet.User.ProfileBackgroundColor;
                        var us20 = tweet.User.ProfileBackgroundImageUrl;
                        var us21 = tweet.User.ProfileBackgroundImageUrlHttps;
                        var us22 = tweet.User.ProfileImageUrl;
                        var us23 = tweet.User.ProfileImageUrlHttps;
                        var us24 = tweet.User.ProfileLinkColor;
                        var us25 = tweet.User.ProfileSidebarBorderColor;
                        var us26 = tweet.User.ProfileSidebarFillColor;
                        var us27 = tweet.User.ProfileTextColor;
                        var us28 = tweet.User.RawSource;
                        var us29 = tweet.User.ScreenName;
                        var us30 = tweet.User.Status;
                        var us31 = tweet.User.StatusesCount;
                        var us32 = tweet.User.TimeZone;
                        var us33 = tweet.User.Url;
                        var us34 = tweet.User.UtcOffset;
                    }

                    var st1 = tweet.Text.ToSafeString(); //string
                    TweetText = tweet.Text;
                    var st2 = tweet.Source; //string
                    var st3 = tweet.TextAsHtml; //string
                    var st4 = tweet.TextDecoded; //string
                    var st5 = tweet.RetweetedStatus; //TwitterStatus
                    var st6 = tweet.RetweetCount; //int
                    var st7 = tweet.RawSource; //string
                    var st8 = tweet.Place; //TwitterPlace
                    var st9 = tweet.Location; //TwitterGeoLocation
                    var st10 = tweet.Language; //string
                    var st11 = tweet.IsTruncated; //bool
                    var st12 = tweet.IsRetweeted; //bool
                    var st13 = tweet.IsPossiblySensitive; //bool is nullable
                    var st14 = tweet.IsFavorited; //bool
                    var st15 = tweet.InReplyToUserId; //long is nullable
                    var st16 = tweet.InReplyToStatusId; //long is nullable
                    var st17 = tweet.InReplyToScreenName; //string
                    var st18 = tweet.IdStr; //string
                    var st19 = tweet.Id; //long
                    var st20 = tweet.FavoriteCount; //int
                    var st21 = tweet.ExtendedEntities; //TwitterExtendedEntities
                    var st22 = tweet.Entities; //TwitterEntities
                    var twitterEntities = new TwitterEntities();
                    twitterEntities = st22;
                    IList<TwitterUrl> twitterUrl = twitterEntities.Urls; //List<TwitterUrl>
                    foreach (var url in twitterUrl)
                    {
                        var url1 = url.DisplayUrl; //string
                        var url2 = url.EndIndex; //int
                        var url3 = url.EntityType; //TwitterEntityType
                        var entityType = url3;
                        //4 Entity Types are Defined
                        //TwitterEntityType.HashTag; //0
                        //TwitterEntityType.Mention; //1
                        //TwitterEntityType.Url; //2
                        //TwitterEntityType.Media; //3

                        var url4 = url.ExpandedValue; //string
                        var url5 = url.Indices; //IList<int>
                        var url6 = url.StartIndex; //int
                        var url7 = url.Value; //string
                        TweetText = TweetText.Trim().Replace(url.Value, String.Empty).Trim();
                    }

                    IList<TwitterMention> twitterMention = twitterEntities.Mentions; //List<TwitterMention>
                    foreach (var mention in twitterMention)
                    {
                        var url1 = mention.EndIndex; //int
                        var url2 = mention.EntityType; //int
                        var entityType = url2;

                        //4 Entity Types are Defined
                        //TwitterEntityType.HashTag; //0
                        //TwitterEntityType.Mention; //1
                        //TwitterEntityType.Url; //2
                        //TwitterEntityType.Media; //3

                        var url3 = mention.Id; //long
                        var url4 = mention.Indices; //IList<int>
                        var url5 = mention.Name; //string
                        var url6 = mention.ScreenName; //string
                        var url7 = mention.StartIndex; //int
                    }
                    IList<TwitterMedia> twitterMedia = twitterEntities.Media; //List<TwitterMedia>
                    foreach (var media in twitterMedia)
                    {
                        var media1 = media.DisplayUrl; //string
                        var media2 = media.EndIndex; //int
                        var media3 = media.EntityType; //TwitterEntity
                        var media4 = media.ExpandedUrl; //string
                        var media5 = media.Id; //long
                        var media6 = media.IdAsString; //string
                        var media7 = media.Indices; //IList<int>
                        var media8 = media.MediaType; //TwitterMediaType
                        var twitterMediaType = media8;

                        /*Three Types of MediaType
                        TwitterMediaType.Photo; //0
                        TwitterMediaType.Video; //1
                        TwitterMediaType.AnimatedGif; //2
                        */

                        var media9 = media.MediaUrl; //string
                        var media10 = media.MediaUrlHttps; //string
                        //var FeedImageURLhttp  = media.MediaUrl; for Http Image
                        //var FeedImageURLhttps  =  media.MediaUrlHttps; for Https Image
                        var media11 = media.Sizes; //TwitterMediaSizes
                        var twitterMediaSizes = media11;
                        //media11.Large
                        //media11.Medium
                        //media11.Small
                        //media11.Thumb
                        var media12 = media.StartIndex; //int
                        var media13 = media.Url; //string

                        TweetText = TweetText.Trim().Replace(media.Url, String.Empty).Trim();
                    }
                    IList<TwitterHashTag> twitterHashTag = twitterEntities.HashTags; //List<TwitterHashTag>
                    foreach (var hashTag in twitterHashTag)
                    {
                        var ht1 = hashTag.EndIndex;
                        var ht2 = hashTag.EntityType;
                        var ht3 = hashTag.Indices;
                        var ht4 = hashTag.StartIndex;
                        var ht5 = hashTag.Text;
                        // hashTagText for refine Tweet Text
                        TweetText = TweetText.Trim().Replace("#" + hashTag.Text, string.Empty).Trim();
                    }
                    TweetText = TweetText.Replace("\n", String.Empty).Trim();
                    var st23 = tweet.CreatedDate; //DateTime
                    var st24 = tweet.Author; //ITweeter

                    var ProfileImageURL = st24.ProfileImageUrl;
                    var ss = st24.RawSource;
                    var screenName = st24.ScreenName;

                }
                return lstModelTwitterFeedsDetail;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }