【问题标题】:Error while trying to use linkedin authorization with OAuth 2.0尝试通过 OAuth 2.0 使用linkedin 授权时出错
【发布时间】:2014-01-31 12:14:25
【问题描述】:

我正在尝试使用 linkedin api 对我的 iPhone 应用程序进行授权,但在授权阶段我不断收到错误消息。 我从应用程序中复制了 URL,并试图查看它在我的浏览器 (chrome) 上的作用,但那里也出现错误。 网址是: https://www.linkedin.com/uas/oauth2/authorization?response_type=code%20&client_id=/myClientId/%20&scope=r_fullprofile%20r_emailaddress%20&state=/stateString/&redirect_uri=http%3A%2F%2Fwww%2Egoogle%2Ecom

在我的浏览器中,我进入链接的主页,顶部的红色条中出现以下错误: 出现意外问题,导致我们无法完成您的请求。

谁能告诉我我做错了什么?

谢谢

【问题讨论】:

    标签: oauth linkedin


    【解决方案1】:

    你的 url 字符串中有一些额外的空格(见粗体):

    您的字符串:https://www.linkedin.com/uas/oauth2/authorization?response_type=code%20&client_id=/myClientId/%20&scope=r_fullprofile%20r_emailaddress%20&state=/stateString/&redirect_uri=http%3A%2F %2Fwww%2Egoogle%2Ecom

    尝试使用: https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=/myClientId/&scope=r_fullprofile%20r_emailaddress%20&state=/stateString/&redirect_uri=http%3A%2F%2Fwww%2Egoogle%2Ecom

    【讨论】:

    • 即使我删除了多余的空格,我仍然遇到同样的问题:/
    • 我发现了另一个额外的空间(在状态之前)。您可以发布未编码的网址吗?还要检查您的 clientid 是否正确。
    • 我重新检查了客户端 ID 并查找了所有多余的空格,但当我尝试在浏览器中使用此 url 时仍然遇到同样的错误。
    • 嗯。好吧,您的网址似乎正确。但是,如果没有更多信息,我们将无法提供帮助。
    • 非常感谢您到目前为止的所有帮助,您需要什么信息?
    【解决方案2】:

    这个错误可能是由于scope=r_fullprofile。默认情况下,LinkedIn 不授予对应用程序的完全访问权限。 Reference

    我在 here 中使用 helloJs,并且我使用了 r_basicprofile,这对我有用。

    【讨论】:

      猜你喜欢
      • 2014-03-30
      • 2014-05-24
      • 2022-12-09
      • 1970-01-01
      • 2017-07-23
      • 1970-01-01
      • 2015-07-24
      • 2011-12-07
      • 2012-06-19
      相关资源
      最近更新 更多