如何从linkedin中获取用户身份验证?

时间:2015-01-16 04:36:02

标签: oauth-2.0 linkedin

我是在CLI中创建应用程序的新手。有人可以帮助获得授权吗?

我试过这段代码:

https://www.linkedin.com/uas/oauth2/authorization?response_type=code
                                           &client_id=78lv1rv8ryh1hf
                                           &scope=scope=r_fullprofile%20r_emailaddress%20r_network
                                           &state=DCEEFWF45453sdffef424
                                           &redirect_uri=http://www.mycoolsite.com

我收到错误说......

error=unsupported_response_type&error_description=We+only+support+a+response_type+of+"code"%2C+but+you+passed+code+

1 个答案:

答案 0 :(得分:0)

有一些事情可以改进:

  1. 您尚未对redirect_uri参数值
  2. 进行网址编码
  3. 您在范围中传递scope=,这似乎是错字/重复
  4. 您可能在网址中插入了空格/换行符,因为以下内容适用于我:
  5.   

    https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=78lv1rv8ryh1hf&scope=r_fullprofile%20r_emailaddress%20r_network&state=DCEEFWF45453sdffef424&redirect_uri=http%3A%2F%2Fwww.mycoolsite.com