HamzaDamiel
HamzaDamiel

Reputation: 11

How to display hometimeline using tweetinvi c# on WPF

Hello I am using the tweetinvi package to create a twitter client on c#. I want to know how to show the timeline of a user along with the user profile and username next to it. I have managed to show the tweets but dont know how to show the profile picture and username. Am I doing this completely wrong?

    TwitterClient userClient = new TwitterClient("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET");

    public Form1()
    {
        InitializeComponent();

    }
   public async void Form1_Load(object sender, EventArgs e)
    {


        var user = await userClient.Users.GetAuthenticatedUserAsync();
        label1.Text = Convert.ToString(user);

        var homeTimeline = await userClient.Timelines.GetHomeTimelineAsync();

        


        

        int n = 288;//LOCATION OF LABEL
        int j = 281;




        for (int i = 0; i < homeTimeline.Length; i++)
        {
            
            Label namelabel = new Label();
            namelabel.Location = new Point(n, j);
            namelabel.Text = Convert.ToString(homeTimeline[i]);
            namelabel.AutoSize = true;
            this.Controls.Add(namelabel);
            
            j = j + 20;

        }


        
    }

Upvotes: 1

Views: 75

Answers (0)

Related Questions