当前位置: 首页>>代码示例>>C#>>正文


C# ConfigurationBuilder.SetOAuthAccessTokenSecret方法代码示例

本文整理汇总了C#中ConfigurationBuilder.SetOAuthAccessTokenSecret方法的典型用法代码示例。如果您正苦于以下问题:C# ConfigurationBuilder.SetOAuthAccessTokenSecret方法的具体用法?C# ConfigurationBuilder.SetOAuthAccessTokenSecret怎么用?C# ConfigurationBuilder.SetOAuthAccessTokenSecret使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConfigurationBuilder的用法示例。


在下文中一共展示了ConfigurationBuilder.SetOAuthAccessTokenSecret方法的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 ();
			};
		}
开发者ID:okrotowa,项目名称:Mosigra.Yorsh,代码行数:32,代码来源:ShareToTwitterActivity.cs


注:本文中的ConfigurationBuilder.SetOAuthAccessTokenSecret方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。