コード例 #1
0
        /// <summary>
        /// 
        /// </summary>
        private void getAccessToken()
        {
            User user = (User)Session["LoggedUser"];
            TwitterHelper twthelper = new TwitterHelper();

            if (Request["oauth_token"] != null)
            {


                try
                {
                    getTwitterUserProfile();
                }
                catch (Exception ex)
                {
                    logger.Error(ex.StackTrace);
                    Console.WriteLine(ex.StackTrace);
                }
                try
                {
                    twthelper.getMentions(OAuth, twitterAccount, user.Id);
                }
                catch (Exception ex)
                {
                    logger.Error(ex.StackTrace);
                    Console.WriteLine(ex.StackTrace);
                }

                try
                {
                    twthelper.getReTweetsOfUser(OAuth, twitterAccount, user.Id);
                }
                catch (Exception ex)
                {
                    logger.Error(ex.StackTrace);
                    Console.WriteLine(ex.StackTrace);
                }


                try
                {
                    twthelper.getUserTweets(OAuth, twitterAccount, user.Id);
                }
                catch (Exception ex)
                {
                    logger.Error(ex.StackTrace);
                    Console.WriteLine(ex.StackTrace);
                }
                try
                {
                    twthelper.getUserFeed(OAuth, twitterAccount, user.Id);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                    logger.Error(ex.StackTrace);
                }
                try
                {
                    twthelper.getSentDirectMessages(OAuth, twitterAccount, user.Id);
                }
                catch (Exception ex)
                {
                    logger.Error(ex.StackTrace);
                    Console.WriteLine(ex.StackTrace);
                }

            }

        }