c# – 使用linkedin验证应用程序时出错

我在尝试使用LinkedIn进行身份验证时遇到以下错误.

“无效的重定向URI”

该链接有效,并在开发者网站链接中的我的应用程序中注册.

什么可能导致此错误?

  var auth = new OAuth2Authenticator
  (
     clientId: "MYID",
     scope: "r_basicprofile",
     authorizeUrl: new Uri("https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=MYID&redirect_uri=https://wicareerpathways.org/&state=987654321&scope=r_basicprofile"),              
     redirectUrl: new Uri("https://wicareerpathways.org/")
  );

最佳答案 试试这个:

var auth = new OAuth2Authenticator (
                clientId: "**",
                clientSecret:"**",
                scope: "r_fullprofile r_contactinfo",
                authorizeUrl: new Uri ("https://www.linkedin.com/uas/oauth2/authorization"),
                redirectUrl: new Uri ("http://www.***.co.nz/"),
                accessTokenUrl:new Uri("https://www.linkedin.com/uas/oauth2/accessToken")    
            );

参考:
https://forums.xamarin.com/discussion/comment/49244/#Comment_49244

点赞