4

i installed tweetinvi but the TwitterCredentials.SetCredentials is not found.

 Install-Package TweetinviAPI

How can i solve this.

TotalWar
  • 335
  • 1
  • 6
  • 16

2 Answers2

13

You're using an old Tweetinvi code.

Tweetinvi break compatibility since version 0.9.9.5. Instead of "TwitterCredentials.SetCredentials" you should now use "Auth.SetUserCredentials"

plaese note that the parameters order has also been changed!

Try this:

Auth.SetUserCredentials("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET");

For more options, see https://github.com/linvi/tweetinvi/wiki/Credentials

Micha Kaufman
  • 777
  • 7
  • 11
  • Can you please share code sample for posting text (it should popup user to sign in Twitter) to any user? – Apparao May 13 '16 at 05:42
0

Try this one:

TwitterCredentials twitterCredentials = new TwitterCredentials("<consumerKey>", "<consumerSecret>", "<accessToken>", "<token_secret">);

Hope this will help.

Daniel Krzyczkowski
  • 2,732
  • 2
  • 20
  • 30