本文整理汇总了C#中ConfigurationBuilder.SetOAuthConsumerSecret方法的典型用法代码示例。如果您正苦于以下问题:C# ConfigurationBuilder.SetOAuthConsumerSecret方法的具体用法?C# ConfigurationBuilder.SetOAuthConsumerSecret怎么用?C# ConfigurationBuilder.SetOAuthConsumerSecret使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigurationBuilder
的用法示例。
在下文中一共展示了ConfigurationBuilder.SetOAuthConsumerSecret方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Autorize);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.sumbit);
button.Click += delegate {
EditText textLogin = FindViewById<EditText> (Resource.Id.login);
EditText textPass = FindViewById<EditText> (Resource.Id.password);
string login = textLogin.Text.ToString ();
string pass = textPass.Text.ToString ();
// TODO change OAuth keys and tokens and username and password
config = new ConfigurationBuilder ();
config.SetOAuthConsumerKey ("nz2FD8IELdrglLbNMJ1WeMsze");
config.SetOAuthConsumerSecret ("Q5ZGt7Bc2McY3xdfjks3AU4yw5DKKSv0h3oXCTpjYhV25qwKL0");
config.SetOAuthAccessToken ("4359603449-6z2CXsqmH4REQayCNgqwq71wM49PjbkSmNIUJil");
config.SetOAuthAccessTokenSecret ("nAvebHjYLn1JXnO4PwqtmTBhPoet5rhIRUnlKghtmT8Ns");
config.SetUser (login);
config.SetPassword (pass);
factory = new TwitterFactory (config.Build ());
twitter = factory.Instance;
GetInfo ();
};
}