Adeel Aftab
Adeel Aftab

Reputation: 1

Not getting Twitter api statuses

I am trying to use the following twitter API, but am unable to get user statuses. Tell me what is the error?

WebClient connectTwitter = new WebClient();
connectTwitter.DownloadStringCompleted += new  
      DownloadStringCompletedEventHandler(connectTwitter_DownloadStringCompleted);
connectTwitter.DownloadStringAsync(new 
      Uri("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=BarackObama"));

Upvotes: 0

Views: 121

Answers (1)

Alden
Alden

Reputation: 6713

You need to authenticate in order to access the Twitter API.

You'll probably want to start here: https://dev.twitter.com/docs/auth/tokens-devtwittercom, and you might want to consider using a C# wrapper for the API, like this: https://github.com/danielcrenna/tweetsharp.

Upvotes: 2

Related Questions