简体   繁体   English

Windows Phone 8.1的吊床

[英]Hammock for Windows Phone 8.1

I have used Hammock Package for LinkedIn Authentication in Windows Phone 8 Silverlight App. 我已经在Windows Phone 8 Silverlight应用程序中使用Hammock包进行LinkedIn身份验证

Now I am developing Windows Phone 8.1 (WInRT) App . 现在,我正在开发Windows Phone 8.1(WInRT)App Hammock is not supported. 不支持吊床 Any replacements? 有替代品吗?

Or can you please forward me link to tutorial on how to use linkedIn authentication in windows phone 8.1 without MVC and without Hammock? 还是您可以将我的链接转发给我,以了解如何在没有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;
    }

Had same problem with Twitter. Twitter也有同样的问题。 I choosed to use AsyncOAuth ( https://github.com/neuecc/AsyncOAuth ). 我选择使用AsyncOAuth( https://github.com/neuecc/AsyncOAuth )。

There's sample Universal app you can rewrite to use it with LinkedIn APIs - https://github.com/neuecc/AsyncOAuth/blob/master/AsyncOAuth.WindowsStoreApp/Twitter.cs . 您可以重写示例通用应用程序以将其与LinkedIn API结合使用-https: //github.com/neuecc/AsyncOAuth/blob/master/AsyncOAuth.WindowsStoreApp/Twitter.cs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM