简体   繁体   中英

Twitterizer Web App Authentication

We have a web app that has a custom twitter feed page. We use Twitterizer to grab all the tweets based on a collection of twitter handlers. This is just a public list of tweets from other twitter users . So we do not require to interaction from users viewing this page such as replying to a tweet, retweet or sending a tweet . From what we understand is that we need OAuth to be able to connect to twitter using ConsumerKey and ConsumerSecret tokens. To get the tokens we need to setup an web app in the twitter:

https://dev.twitter.com/apps

So we made one and we use the ConsumerKey and ConsumerSecret to get our web app authenticated.

    OAuthTokenResponse requestTokenResponse = OAuthUtility.GetRequestToken(
        ConfigurationManager.AppSettings["Twitter.ConsumerKey"],
        ConfigurationManager.AppSettings["Twitter.ConsumerSecret"],
        callbackUrl);
    string authUrl = OAuthUtility.BuildAuthorizationUri(requestTokenResponse.Token, true).AbsoluteUri;
    Response.Redirect(authUrl);

It seems like this setup we have currently is not the process that we need. From the looks of it its like trying to gain a connection to twitter using another twitter account. We don't want any login for this process. Just like I said we only want to generate a list of tweets based on a collection of twitter handlers.

what we've noticed is that the first time users view this custom twitter feed page the user is sent to another page in twitter where they are asked to login. We don't want users viewing our custom twitter feed page to login. Is there a way to eleminate this process? and if so how can we do that using Twitterizer or any alternative?

In version 1.0 of the Twitter API, you don't need to authenticate for reading public tweets. Eg this call can be used to obtain the public tweets of a special user.

For the new version 1.1 see eg this question .

Twitterizer currently only implements version 1.0, but as you don't need to authenticate via OAuth, you can just directly issue GET requests to Twitter without any special library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM