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.
Asked
Active
Viewed 638 times
2
-
Weird.From [docs](http://bit.ly/13J34Wx): "Managing Keys After registering your application, you can obtain your OAuth keys. Y There are two keys you need for all OAuth scenarios, ConsumerKey and ConsumerSecret. You'll find the keys by visiting the Twitter Developer site, selecting My apps, and clicking the title of your application. You will put these keys in the appSettings section of app.config, web.config, or elsewhere depending on what type of application you're building. You could even create your own custom key store, but the goal is to make them available to your application. (...)" – Alfredo Cavalcanti Jul 14 '13 at 18:21
-
Yes - that is exactly the confusing part – George Mauer Jul 14 '13 at 18:29
2 Answers
2
Please read https://dev.twitter.com/docs/auth/obtaining-access-tokens
and particularly https://dev.twitter.com/docs/auth/tokens-devtwittercom

Antonio Pelleriti
- 855
- 7
- 10
-
Ah yes, that was the issue - I didn't see the button to generate oath tokens at the bottom – George Mauer Jul 14 '13 at 18:54
1
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.

Joe Mayo
- 7,501
- 7
- 41
- 60
-
Thanks Joe - the part that I was missing is that I didn't know I had to find a button to generate my oath token. – George Mauer Jul 14 '13 at 18:56