我在Windows Phone 8 Silverlight 应用程序中使用Hammock 包进行LinkedIn 身份验证。
现在我正在开发Windows Phone 8.1 (WInRT) App。不支持吊床。有替代品吗?
或者您能否将我的链接转发给关于如何在没有 MVC 和 Hammock 的 Windows Phone 8.1 中使用linkedIn 身份验证的教程?
using Hammock.Authentication.OAuth;
using Hammock.Web;
internal static OAuthWebQuery GetRequestTokenQuery() //using Hammock.Authentication.OAuth;
{
SingletonClass singletonInstance = SingletonClass.MeraKyaHogaSingletonClassObject; //Singleton Instance
var oauth = new OAuthWorkflow
{
ConsumerKey = singletonInstance.LinkedIn_consumerKey,
ConsumerSecret = singletonInstance.LinkedIn_consumerKeySecret,
SignatureMethod = OAuthSignatureMethod.HmacSha1,
ParameterHandling = OAuthParameterHandling.HttpAuthorizationHeader,
RequestTokenUrl = singletonInstance.LinkedIn_RequestTokenUri,
Version = singletonInstance.LinkedIn_oAuthVersion,
CallbackUrl = singletonInstance.LinkedIn_CallbackUri
};
var info = oauth.BuildRequestTokenInfo(WebMethod.Get); //using Hammock.Web;
var objOAuthWebQuery = new OAuthWebQuery(info, false);
objOAuthWebQuery.HasElevatedPermissions = true;
objOAuthWebQuery.SilverlightUserAgentHeader = "Hammock";
return objOAuthWebQuery;
}