1

I'm designing a website using forms asp.net I would like this website to view tweets for a from a twitter account timeline using spring social twitter API the problem is when I i run the web page it show this error

The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.

I'm sure that I have the latest version of the library as it works fine with there console application sample code but they neither provide a sample for AS.NET forms nor a proper documentation I'm really lost and I can't figure how to use it

anyway here's my code and I would really appreciate any help

string consumerKey = //my kry;
        string consumerKeySecret = //my key secret;
        string accessToken = //my token;
        string accessTokenSecret = //my token secret;

        ITwitter twitter = new TwitterTemplate(consumerKey, consumerKeySecret, accessToken, accessTokenSecret);
        IList<Tweet> tweets = twitter.TimelineOperations.GetUserTimeline();

        foreach (var tweet in tweets)
            lbl.Text = lbl.Text + "\n" + tweet;
SpruceMoose
  • 9,737
  • 4
  • 39
  • 53
Scarnet
  • 738
  • 2
  • 11
  • 36

1 Answers1

0

The API you are using seems to be deprecated. I am personally used Tweetinvi for lots of developments related with Twitter and lots of features are already implemented.

Also it is compatible with Twitter 1.1.

Here is how to get the timeline of the connected user:

var user = User.GetLoggedUser();
var timeline = user.GetUserTimeline();
user2465083
  • 595
  • 3
  • 12