Authorize Only Once

Jul 30, 2013 at 4:57 PM
Hello,

I'm creating a website that pulls tweets from our twitter account and displays them along with other posts from various social media outlets. The page is a .NET web forms page, and the language is C#. I'm basically creating a page that on the back end does the authentication, and is where I've put all my linq code, and then the front end is where I dump the json. Then there is a script on my page that reads through the json and displays the tweets.

I've created an app, and have put the consumer key and secret in my web config. I used the source code for web forms example on this site with a couple little tweaks to make it work with my site. I type the url for the twitter file I've created, and I am brought to an Authorize App page, I click Authorize, and everything works. I can go to my home page and tweets are showing up just fine.

But then about two hours later I have to go through the whole thing again. How do I make it so that I only have to authorize the app once?
Coordinator
Aug 1, 2013 at 3:47 AM
Hi,

After authorization is successful, the Credentials in your authorizer will have 4 tokens. Save those after authorization and then re-load them on subsequent queries. Whenever you have all 4 tokens assigned to the authorizer's credentials, you don't need to authorize.

@JoeMayo
Aug 1, 2013 at 3:08 PM
Hey Joe,

Thanks for responding! I figured out the problem. I was using a WebAuthorizer when I should have been using SingleUserAuthorizer. That way I didn't have to have my app actually make the request to be authorized. Thank you!

-Sean