如何在WindowsPhone8.1中使用Twitter进行身份验证?
在我的Windows Phone 8.1应用程序中,我有以下通过Twitter进行登录身份验证的代码:如何在WindowsPhone8.1中使用Twitter进行身份验证?,twitter,oauth,windows-phone-8.1,Twitter,Oauth,Windows Phone 8.1,在我的Windows Phone 8.1应用程序中,我有以下通过Twitter进行登录身份验证的代码: user=App.MobileService.LoginAsync(MobileServiceAuthenticationProvider.Twitter) 但在wp8.1中,LoginAsync方法需要2个参数,第二个参数应该是:JObject令牌,其中token是一个特定于提供者的对象,具有要登录的现有OAuth令牌 我应该输入什么作为第二个参数? 具有Twitter访问键的JObject
user=App.MobileService.LoginAsync(MobileServiceAuthenticationProvider.Twitter)代码>
但在wp8.1中,LoginAsync方法需要2个参数,第二个参数应该是:JObject令牌
,其中token
是一个特定于提供者的对象,具有要登录的现有OAuth令牌
我应该输入什么作为第二个参数?
具有Twitter访问键的JObject类的对象?
如果是,如何将密钥分配给对象?令牌对象需要根据特定的提供程序进行格式化。以下是一些基于提供者的格式示例:
MicrosoftAccount
{“authenticationToken”:
所以可能是
user=App.MobileService.LoginAsync(
MobileServiceAuthenticationProvider.Twitter,
{“访问令牌”:“}”);
编辑:是的,你说得对。它不可能是字符串
JObject obj=JObject.Parse(@“{”访问令牌“:”}”);
user=App.MobileService.LoginAsync(
MobileServiceAuthenticationProvider.Twitter,obj);
您可以使用它将登录与Twitter按钮集成
我是此库的作者,因此如果您需要一些不存在的功能或教程的说明,请告诉我第二个参数不能是字符串,但