Exemplo n.º 1
0
 /// <summary>
 /// This Method Get All Followers Details of User
 /// </summary>
 /// <param name="oAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <param name="ScreenName">User Screen Name</param>
 /// <returns></returns>
 public XmlDocument FollowersStatus(oAuthTwitter oAuth, string ScreenName, string cursor)
 {
     string RequestUrl = Globals.FollowerStatusUrl + ScreenName + ".xml?cursor=" + cursor;
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, string.Empty);
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 2
0
 /// <summary>
 /// This Method Will Get All Friends Id of User  
 /// </summary>
 /// <param name="OAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <param name="ScreenName">ScreenName Of Whom You Want To Get FriendsId</param>
 /// <returns>All Friends Id</returns>
 public XmlDocument FriendsId(oAuthTwitter OAuth, string ScreenName)
 {
     string RequestUrl = Globals.FriendsIdUrl + ScreenName;
     string response = OAuth.oAuthWebRequest(oAuthTwitter.Method.GET,RequestUrl,string.Empty);
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 3
0
        //#region OAuth
        ///// <summary>
        ///// This Method Will Check That User is Authenticated Or Not Using OAUTH
        ///// </summary>
        ///// <param name="OAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
        ///// <returns>Return Xml Text With User Details</returns>
        //public XmlDocument Verify_Credentials(oAuthTwitter OAuth)
        //{
        //    string response = OAuth.oAuthWebRequest(oAuthTwitter.Method.GET, Globals.VerifyCredentialsUrl, String.Empty);
        //    xmlResult.Load(new StringReader(response));
        //    return xmlResult;
        //}

        /// <summary>
        /// This method Will Check Rate Limit Of Account Using OAUTH
        /// </summary>
        /// <param name="OAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
        /// <returns>Return Xml Text With User Details</returns>
        public XmlDocument Rate_Limit_Status(oAuthTwitter OAuth, SortedDictionary<string, string> strdic)
        {
            
            string response = OAuth.oAuthWebRequest(oAuthTwitter.Method.GET, Globals.RateLimitStatusUrl, strdic);
            xmlResult.Load(new StringReader(response));
            return xmlResult;
        }
Exemplo n.º 4
0
        public static bool FollowAccount(string AccessToken,string AccessTokenSecret ,string Screen_name, string user_id) 
        {
            bool IsFollowed = false;
            oAuthTwitter oauth = new oAuthTwitter();

            oauth.AccessToken = AccessToken;
            oauth.AccessTokenSecret = AccessTokenSecret;
            oauth.ConsumerKey = ConfigurationManager.AppSettings["consumerKey"];
            oauth.ConsumerKeySecret = ConfigurationManager.AppSettings["consumerSecret"];
            string RequestUrl = "https://api.twitter.com/1.1/friendships/create.json";
            SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
            if (!string.IsNullOrEmpty(Screen_name)) 
            {
                strdic.Add("screen_name", Screen_name);
            }
            else if (!string.IsNullOrEmpty(user_id))
            {
                strdic.Add("user_id", user_id);
            }
            else 
            {
                return false;
            }
            strdic.Add("follow", "true");
            string response = oauth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, strdic);
            if (!string.IsNullOrEmpty(response)) 
            {
                IsFollowed = true;
            }
            return IsFollowed;
        }
Exemplo n.º 5
0
 /// <summary>
 /// This Method Will Get All Trends Of Twitter Using OAUTH
 /// </summary>
 /// <param name="User">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <returns>Json Text Of Trends</returns>
 public XmlDocument SearchMethod(oAuthTwitter OAuth, string SearchKey, string pageindex)
 {
     TwitterWebRequest twtWebReq = new TwitterWebRequest();
     string RequestUrl = Globals.SearchUrl + SearchKey + "&page=" + pageindex; 
     string response = OAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl,string.Empty);
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status. Returns the destroyed status if successful.
 /// </summary>
 /// <param name="oAuth"></param>
 /// <param name="UserId"></param>
 /// <returns></returns>
 public JArray Post_Statuses_DestroyById(oAuthTwitter oAuth, string UserId)
 {
     SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
     string RequestUrl = Globals.StatusDestroyByIdUrl + UserId + ".json";
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, strdic);
     if (!response.StartsWith("["))
         response = "[" + response + "]";
     return JArray.Parse(response);
 } 
Exemplo n.º 7
0
 public int FollowersCount(oAuthTwitter oAuth, string screenname, SortedDictionary<string, string> strdic)
 {
     string RequestUrl = "https://api.twitter.com/1/users/lookup.xml?screen_name=" + screenname;
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);
     
     
     
     xmlResult.Load(new StringReader(response));
     TwitterUser twtUser = new TwitterUser();
     XmlNodeList xmlNodeList = xmlResult.GetElementsByTagName("user");
     int count = 0;
     foreach (XmlNode xn in xmlNodeList)
     {
         XmlElement idElement = (XmlElement)xn;
         count = Convert.ToInt32(idElement.GetElementsByTagName("followers_count")[0].InnerText);
     }
     return count;
 }
Exemplo n.º 8
0
 /// <summary>
 /// UnFollow Twitter User Using OAUTH
 /// </summary>
 /// <param name="twitterUser">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <param name="UserToFollow">ScreenName Of Whom You Want To UnFollow</param>
 /// <returns>Returm Xml</returns>
 public XmlDocument Friendships_Destroy(oAuthTwitter oAuth, int UserId)
 {
     string RequestUrl = Globals.UnFollowUrlById + UserId;
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, string.Empty);
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 9
0
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
  /// Returns a collection of user_ids that the currently authenticated user does not want to receive retweets from.
 /// </summary>
 /// <param name="oAuth"></param>
 /// <returns></returns>
 public JArray Get_Friendships_No_Retweets_Id(oAuthTwitter oAuth)
 {
      string RequestUrl = Globals.GetFriendshipsNoRetweetsIdUrl;
      SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
      string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);
      if (!response.StartsWith("["))
          response = "[" + response + "]";
      return JArray.Parse(response);
 }
Exemplo n.º 10
0
        /// <summary>
        /// Post a tweet with Image
        /// </summary>
        /// <param name="oAuth"></param>
        /// <param name="UserId"></param>
        /// <param name="postData"></param>
        /// <returns></returns>
        //public string Post_Statuses_Update_With_Media(oAuthTwitter oAuth, string UserId, string postData, string imageFile)
        //{
        //    string RequestUrl = Globals.PostStatusUpdateWithMediaUrl;
        //    string response=oAuth.webRequestWithContentType(oAuth, imageFile, "multipart/form-data; boundary=", RequestUrl,postData);

        //    return response;
        //}

       
        #endregion

        #region Get_Statuses_retweetersById
        /// <summary>
        /// Returns a collection of up to 100 user IDs belonging to users who have retweeted the tweet specified by the id parameter.
        /// </summary>
        /// <param name="oAuth"></param>
        /// <param name="UserId"></param>
        /// <param name="postData"></param>
        /// <returns></returns>
        public JArray Get_Statuses_retweetersById(oAuthTwitter oAuth, string StatusId)
        {
            string RequestUrl = Globals.GetStatusesRetweetersByIdUrl;
            SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
            strdic.Add("id", StatusId);
            strdic.Add("count", "100");
            strdic.Add("stringify_ids", "true");
            string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);
            if (!response.StartsWith("["))
                response = "[" + response + "]";
            return JArray.Parse(response);
        }
Exemplo n.º 11
0
 /// <summary>
 /// This Method Will Check That User is Authenticated Or Not Using OAUTH
 /// </summary>
 /// <param name="OAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <returns>Return Xml Text With User Details</returns>
 public JArray Verify_Credentials(oAuthTwitter OAuth)
 {
     SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
     string response = OAuth.oAuthWebRequest(oAuthTwitter.Method.GET, Globals.VerifyCredentialsUrl, strdic);
     //xmlResult.Load(new StringReader(response));
     if (!response.StartsWith("["))
         response = "[" + response + "]";
     return JArray.Parse(response);
 }
Exemplo n.º 12
0
        public string Get_Search_Users(oAuthTwitter oAuth, string SearchKeyword)
        {

            string RequestUrl = "https://api.twitter.com/1.1/users/search.json";
            SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
            strdic.Add("q", SearchKeyword);
            string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);
            if (!response.StartsWith("["))
                response = "[" + response + "]";
            return response;
        }
Exemplo n.º 13
0
        //public Dictionary<string, int> getTwitterRetweetsList(string Id, string Accesstoken, int days)
        //{
        //    JObject output = new JObject();
        //    try
        //    {
        //        SortedDictionary<string, string> requestParameters = new SortedDictionary<string, string>();
        //        requestParameters.Add("count", "100");
        //        //requestParameters.Add("screen_name", ScreenName);
        //        //requestParameters.Add("cursor", "-1");
        //        //Token URL
        //        var oauth_url = "https://api.twitter.com/1.1/statuses/retweets/" + Id + ".json";
        //        var headerFormat = "Bearer {0}";
        //        //var authHeader = string.Format(headerFormat, "AAAAAAAAAAAAAAAAAAAAAOZyVwAAAAAAgI0VcykgJ600le2YdR4uhKgjaMs%3D0MYOt4LpwCTAIi46HYWa85ZcJ81qi0D9sh8avr1Zwf7BDzgdHT");
        //        var authHeader = string.Format(headerFormat, "AAAAAAAAAAAAAAAAAAAAAOZyVwAAAAAAgI0VcykgJ600le2YdR4uhKgjaMs%3D0MYOt4LpwCTAIi46HYWa85ZcJ81qi0D9sh8avr1Zwf7BDzgdHT");

        //        var postBody = requestParameters.ToWebString();
        //        ServicePointManager.Expect100Continue = false;

        //        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(oauth_url + "?"
        //               + requestParameters.ToWebString());

        //        request.Headers.Add("Authorization", authHeader);
        //        request.Method = "GET";
        //        request.Headers.Add("Accept-Encoding", "gzip");

        //        HttpWebResponse response = request.GetResponse() as HttpWebResponse;
        //        Stream responseStream = new GZipStream(response.GetResponseStream(), CompressionMode.Decompress);
        //        using (var reader = new StreamReader(responseStream))
        //        {

        //            JavaScriptSerializer js = new JavaScriptSerializer();
        //            var objText = reader.ReadToEnd();
        //            output = JObject.Parse(objText);


        //        }
        //    }
        //    catch (Exception e)
        //    {
        //        logger.Error(e.Message);
        //    }

        //    // return output.ToString();



        //    Dictionary<string, int> LikesByDay = new Dictionary<string, int>();
        //    // LikesByDay = getTwitterFollowers(outputface);

        //    return LikesByDay;
        //}

        public string getTwitterRetweets(string Accesstoken, string AccesstokenSecret, int days, string LastId)
        {
            oAuthTwitter oauth = new oAuthTwitter();

            oauth.AccessToken = Accesstoken;
            oauth.AccessTokenSecret = AccesstokenSecret;
            oauth.ConsumerKey = ConfigurationManager.AppSettings["consumerKey"];
            oauth.ConsumerKeySecret = ConfigurationManager.AppSettings["consumerSecret"];
            string RequestUrl = "https://api.twitter.com/1.1/statuses/retweets_of_me.json";
            SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
            strdic.Add("count", "100");
            if (!string.IsNullOrEmpty(LastId))
            {
                strdic.Add("max_id", LastId);
            }
            //strdic.Add("screen_name", ScreenName);
            string response = oauth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);

            return response;

        }
Exemplo n.º 14
0
 /// <summary>
 /// This Method Will Show User Statues Using OAUTH
 /// </summary>
 /// <param name="oAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <param name="ScreenName">Twitter UserName</param>
 /// <returns>Return User Status Details</returns>
 public XmlDocument ShowStatusByScreenName(oAuthTwitter oAuth, string ScreenName)
 {
     string RequestUrl = Globals.ShowStatusUrlByScreenName+ScreenName;
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, string.Empty);
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 15
0
 /// <summary>
 /// Returns a cursored collection of user objects for users following the specified user.
 /// </summary>
 /// <param name="oAuth"></param>
 /// <param name="UserId"></param>
 /// <returns></returns>
 public JArray Get_Followers_List(oAuthTwitter oAuth)
 {
     SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
     string RequestUrl = Globals.GetFollowersListUrl;
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);
     if (!response.StartsWith("["))
         response = "[" + response + "]";
     return JArray.Parse(response);
 }
Exemplo n.º 16
0
 /// <summary>
 /// This Method Will Update Tweets On Twitter Using OAUTH
 /// </summary>
 /// <param name="oAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <param name="StatusText">Status Messages</param>
 /// <returns>Return Xml Text Of Details</returns>
 public XmlDocument UpdateStatus(oAuthTwitter oAuth, string StatusText)
 {
     string RequestUrl = Globals.UpdateStatusUrl + "?status=";
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, oAuth.UrlEncode(StatusText));
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 17
0
 /// <summary>
 /// Updates the authenticating user's current status, also known as tweeting.
 /// </summary>
 /// <param name="oAuth"></param>
 /// <returns></returns>
 public JArray Post_Statuses_Update(oAuthTwitter oAuth, string statuses)
 {
     string response = string.Empty;
     try
     {
         SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
         strdic.Add("status",statuses);
         string RequestUrl = Globals.StatusUpdateUrl;
         response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, strdic);
         if (!response.StartsWith("["))
             response = "[" + response + "]";
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
     }
     
     return JArray.Parse(response);
 } 
Exemplo n.º 18
0
 public JArray Post_report_as_spammer(oAuthTwitter oAuth, string userScreaanNameorId)
 {
     string RequestUrl = Globals.PostUserReportAsSpammerById;
     SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
     strdic.Add("screen_name", userScreaanNameorId);
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, strdic);
     if (!response.StartsWith("["))
         response = "[" + response + "]";
     return JArray.Parse(response);
 }
Exemplo n.º 19
0
 public JArray Post_favorites(oAuthTwitter oAuth, string desirestatusId)
 {
     string RequestUrl = Globals.PostStatusFavoritesById;
     SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
     strdic.Add("id", desirestatusId);
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, strdic);
     if (!response.StartsWith("["))
         response = "[" + response + "]";
     return JArray.Parse(response);
 }
Exemplo n.º 20
0
 //post reply
 public JArray Post_StatusesUpdate(oAuthTwitter oAuth, string statuses, string statusid)
 {
     string RequestUrl = Globals.StatusUpdateUrl;
     SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
     strdic.Add("status", statuses);
     strdic.Add("in_reply_to_status_id", statusid);
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, strdic);
     if (!response.StartsWith("["))
         response = "[" + response + "]";
     return JArray.Parse(response);
 }
Exemplo n.º 21
0
 /// <summary>
 /// Allows one to enable or disable retweets and device notifications from the specified user.
 /// </summary>
 /// <param name="oAuth"></param>
 /// <returns></returns>
 public JArray Post_Friendships_Update(oAuthTwitter oAuth,string UserId,bool device)
 {
     SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
     strdic.Add("user_id", UserId);
     strdic.Add("device", device.ToString());
     string RequestUrl = Globals.PostFriendshipsDestroyUrl;
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, strdic);
     if (!response.StartsWith("["))
         response = "[" + response + "]";
     return JArray.Parse(response);
 }
Exemplo n.º 22
0
 /// <summary>
 /// This Method is Depricated. Please Use "Get_Direct_Message(oAuth,count)" instead.
 /// This Method Will Get All Direct Message Of User Using OAUTH
 /// </summary>
 /// <param name="OAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <param name="Count">Number Of DirectMessage</param>
 /// <returns>Xml Text Of DirectMessage</returns>
 public XmlDocument DirectMessages(oAuthTwitter OAuth, string Count)
 {
     string RequestUrl = Globals.DirectMessageGetByUserUrl + Count;
     string response = OAuth.oAuthWebRequest(oAuthTwitter.Method.GET,RequestUrl,string.Empty);
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 23
0
 /// <summary>
 /// Returns detailed information about the relationship between two arbitrary users.
 /// </summary>
 /// <param name="oAuth"></param>
 /// <returns></returns>
 public JArray Get_Friendships_Show(oAuthTwitter oAuth,string source_screenname,string getScreenname)
 {
     SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
     strdic.Add("source_screen_name",source_screenname);
     strdic.Add("target_screen_name", getScreenname);
     string RequestUrl = Globals.GetFriendshipsShowUrl;
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl,strdic);
     if (!response.StartsWith("["))
         response = "[" + response + "]";
     return JArray.Parse(response);
 }
Exemplo n.º 24
0
        /// <summary>
        /// Returns a collection of relevant Tweets matching a specified query.
        /// </summary>
        /// <param name="oAuth"></param>
        /// <param name="SearchKeyword"></param>
        /// <returns> </returns>
        public JArray Get_Search_Tweets(oAuthTwitter oAuth, string SearchKeyword)
        {

            string RequestUrl = Globals.GetSearchTweetsUrl;
            SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
            strdic.Add("q", SearchKeyword);
            strdic.Add("count","20");
            string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);
            if (!response.StartsWith("["))
                response = "[" + response + "]";
            return JArray.Parse(response);
        }
Exemplo n.º 25
0
 /// <summary>
 /// Follow Twitter User Using OAUTH
 /// </summary>
 /// <param name="twitterUser">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <param name="UserToFollow">ScreenName Of Whom You Want To Follow</param>
 /// <returns>Returm Xml</returns>
 public XmlDocument Friendships_Create(oAuthTwitter oAuth, string ScreenName, SortedDictionary<string, string> strdic)
 {
     string RequestUrl = Globals.FollowerUrl + ScreenName;
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, RequestUrl, strdic);
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 26
0
 /// <summary>
 /// This Method Will Show User Statues By Id Using OAUTH
 /// </summary>
 /// <param name="oAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <param name="UserId">Twitter UserId Of User</param>
 /// <returns>It will Show User Status Details</returns>
 public XmlDocument ShowStatus(oAuthTwitter oAuth, string UserId)
 {
     string RequestUrl = Globals.ShowStatusUrl + UserId + ".xml";
     string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, string.Empty);
     xmlResult.Load(new StringReader(response));
     return xmlResult;
 }
Exemplo n.º 27
0
        public string Get_Search_SingleUser(oAuthTwitter oAuth, string SearchKeyword, string ScreenName)
        {

            string RequestUrl = "https://api.twitter.com/1.1/users/show.json";
            SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
            strdic.Add("user_id", SearchKeyword);
            strdic.Add("screen_name", ScreenName);
            string response = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);

            return response;
        }
Exemplo n.º 28
0
 /// <summary>
 /// This Method Will Get All Trends Of Twitter Using OAUTH
 /// </summary>
 /// <param name="User">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param>
 /// <returns>Json Text Of Trends</returns>
 public string Trends(oAuthTwitter OAuth, SortedDictionary<string, string> strdic)
 {
     string response = OAuth.oAuthWebRequest(oAuthTwitter.Method.GET, Globals.TrendsUrl, strdic);
     return response;
 }
Exemplo n.º 29
0
        public Dictionary<DateTime, int> getTwittermentionsList(string Id, string Accesstoken, string AccesstokenSecret, int days)
        {
            Accesstoken = "2787373862-Quo4aeQX1Mcw5AJhJlFS1IWzA1M5P9X9lYRV7n1";
            AccesstokenSecret = "3lpIu1qPdEreiQQADpo5AywQWOjW27wpY8jPe2PkXveHK";
            //days = 9;
            Id = "3170677652";
            oAuthTwitter oauth = new oAuthTwitter();

            oauth.AccessToken = Accesstoken;
            oauth.AccessTokenSecret = AccesstokenSecret;
            oauth.ConsumerKey = ConfigurationManager.AppSettings["consumerKey"];
            oauth.ConsumerKeySecret = ConfigurationManager.AppSettings["consumerSecret"];
            string RequestUrl = "https://api.twitter.com/1.1/statuses/mentions_timeline.json";
            SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
            strdic.Add("count", "100");
            //strdic.Add("screen_name", ScreenName);
            string response = oauth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);

            JArray resarray = JArray.Parse(response);

            DateTime date = DateTime.Now;
            int count = 0;
            Dictionary<DateTime, int> LikesByDay = new Dictionary<DateTime, int>();
            List<DateTime> datetimeLIst = new List<DateTime>();
            foreach (var resobj in resarray)
            {
                string Const_TwitterDateTemplate = "ddd MMM dd HH:mm:ss +ffff yyyy";
                DateTime Createdat = DateTime.ParseExact((string)resobj["created_at"], Const_TwitterDateTemplate, new System.Globalization.CultureInfo("en-US"));
                datetimeLIst.Add(Createdat.Date);
            }

            while (date.Date >= DateTime.Now.AddDays(-days).Date)
            {
                count = 0;
                foreach (DateTime dt in datetimeLIst)
                {
                    if (dt.Date == date.Date)
                    {
                        count++;
                    }

                }
                LikesByDay.Add(date, count);
                date = date.AddDays(-1);
            }



            // LikesByDay = getTwitterFollowers(outputface);

            return LikesByDay;
        }
        public string TwitterTweetDetails(string TweetId, string Accesstoken, string AccesstokenSecret)
        {
            oAuthTwitter oauth = new oAuthTwitter();

            oauth.AccessToken = Accesstoken;
            oauth.AccessTokenSecret = AccesstokenSecret;
            oauth.ConsumerKey = ConfigurationManager.AppSettings["consumerKey"];
            oauth.ConsumerKeySecret = ConfigurationManager.AppSettings["consumerSecret"];
            string RequestUrl = "https://api.twitter.com/1.1/statuses/show.json";
            SortedDictionary<string, string> strdic = new SortedDictionary<string, string>();
            strdic.Add("id", TweetId);

            string response = oauth.oAuthWebRequest(oAuthTwitter.Method.GET, RequestUrl, strdic);

            return response;
        }