Reputation: 122112
I'm trying to use simple single-user in-memory credentials to connect to my twitter app and do a simple timeline search. I have my consumer secret and key but On the instructions page it also lists a need for an oauth token and access token. What are these? Where do I get them.
Upvotes: 2
Views: 647
Reputation: 7513
I've updated that page. Here's the recommended way to use SingleUserAuthorizer:
var auth = new SingleUserAuthorizer
{
Credentials = new SingleUserInMemoryCredentials
{
ConsumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"],
ConsumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"],
TwitterAccessToken = ConfigurationManager.AppSettings["twitterAccessToken"],
TwitterAccessTokenSecret = ConfigurationManager.AppSettings["twitterAccessTokenSecret"]
}
};
Here, you can see that the code populates TwitterAccessToken and TwitterAccessTokenSecret from values in your config file. Visit your app at https://dev.twitter.com to find these keys. Then populate the appSettings (twitterAccessToken and twitterAccessTokenSecret) in your config file with the AccessToken and AccessTokenSecret from your Twitter app page.
Upvotes: 1
Reputation: 859
Please read https://dev.twitter.com/docs/auth/obtaining-access-tokens
and particularly https://dev.twitter.com/docs/auth/tokens-devtwittercom
Upvotes: 2