Click here to Skip to main content
11,414,561 members (70,209 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET API twitter
Somebody can explain me this code :

auth = new MvcAuthorizer
           {
               Credentials = credentials               
           };
 
           auth.CompleteAuthorization(Request.Url);


var auth = new MvcAuthorizer
            {
                Credentials = new SessionStateCredentials()
                {
                    ConsumerKey = this.client.ConsumerKey,
                    ConsumerSecret = this.client.ConsumerSecret,
                    OAuthToken = identity.Token.Token
                }
            };



Thanks,
Posted 15-Jun-12 6:07am
saisne505

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You have an overloaded constructor here. The first is taking in a set of credentials while the second is building that set of credentials. The overarching idea behind this code is that Twitter applications need to use an authentication token to connect to most Twitter services. This is so that the applications can be rate-controlled. The second code bit is building that authorization credenial set. To get these credentials, you need to contact Twitter to set up a developer account.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,130
1 OriginalGriff 7,477
2 Maciej Los 3,710
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web02 | 2.8.150427.4 | Last Updated 15 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100