0

我在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;
    }
4

1 回答 1

0

Twitter也有同样的问题。我选择使用 AsyncOAuth ( https://github.com/neuecc/AsyncOAuth )。

您可以重写示例通用应用程序以将其与 LinkedIn API 一起使用 - https://github.com/neuecc/AsyncOAuth/blob/master/AsyncOAuth.WindowsStoreApp/Twitter.cs

于 2015-02-28T17:24:03.170 回答