I am trying to access my own timeline on Twitter.
On web browswer like google chrome or firefox, this can be accessed on this url:
https://twitter.com/Your Account ID
It is not required to login to just view this page.
I am trying to do the same using Web Client or Http Client in Csharp Winform project.
Somehow, I was able to download the html page from twitter.
However, html page is just an error message saying that "This browser is no longer supported".
I tried to change the agent but it does not really work.
I only need to check what is the latest post in the twitter with simplest code as possible.
Can I achieve this with Web Client or Http Client without using other heavy libary or APi ?
Can someone share some working code ?
What I have tried:
using (WebClient client = new WebClient())
{
client.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko);)");
client.DownloadFile(url, "twitter.html");
}