简体   繁体   中英

Hammock for Windows Phone 8.1

I have used Hammock Package for LinkedIn Authentication in Windows Phone 8 Silverlight App.

Now I am developing 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?

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. I choosed to use 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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