Click here to Skip to main content
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 5:07am
saisne484

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 OriginalGriff 405
1 Peter Leow 225
2 Sergey Alexandrovich Kryukov 210
3 Maciej Los 195
4 DamithSL 174


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